Posts

rustup

curl https://sh.rustup.rs -sSf | sh
 or
pacman -S rustup
rustup install stable / 
rustup install toolchain stable-x86_64-unknown-linux-gnu

The computer restarted unexpectedly error on restart after before completing setup

troubleshoot >command prompt >regedit

KEY_LOCAL_MACHINE \SYSTEM : \system32\config\system
HKEY_LOCAL_MACHINE \SAM : \system32\config\sam
HKEY_LOCAL_MACHINE \SECURITY : \system32\config\security
HKEY_LOCAL_MACHINE \SOFTWARE : \system32\config\software
HKEY_USERS \UserProfile :  \winnt\profiles\username
HKEY_USERS.DEFAULT : \system32\config\default

import reg hive to edit (\system32\config\system\)

or shift+f10 on error message to open terminal and open regedit 

Once Registry Editor starts, navigate to the HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\ChildCompletion and double click the setup.exe in the right pane.

setup.exe

change its dword value from 1 to 2

windows 7/8/10 bootable from linux

user agent switcherhttps://chrome.google.com/webstore/detail/user-agent-switcher-for-c/djflhoibgkdhkhhcedjiklpkjnoahfmg switch user agent=linux/androidiso link  https://www.microsoft.com/en-in/software-download/windows10ISOsudo woeusb --target-filesystem NTFS --device ~/Downloads/windows.iso /dev/sdx

arch4edu repo

nano/vi /etc/pacman.conf [arch4edu] SigLevel = Never Server = https://mirrors.tuna.tsinghua.edu.cn/arch4edu/$arch view apps:https://mirrors.tuna.tsinghua.edu.cn/arch4edu/src/bugs:https://github.com/arch4edu/arch4edu/wiki

debian unstable anbox test

sudo apt install anbox
sudo modprobe ashmem_linux
sudo modprobe binder_linux

sudo service anbox-container-manager start
anbox session-manager
anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity

-------------------
download android iamge  https://build.anbox.io/android-images
move it to as /var/lib/anbox/android.img

git

$ git config --global user.name "John Doe"
 $ git config --global user.email [email protected]

dmenurecord

apt install dmenu i3 ffmpeg i3blocks
touch ~/scripts/dmenurecord
nano dmenurecord
------------------------------------------------------
#!/bin/sh

# Usage:
# `record`: Ask for recording type via dmenu
# `record screencast`: Record both audio and screen
# `record video`: Record only screen
# `record audio`: Record only audio
# `record kill`: Kill existing recording
#
# If there is already a running instance, user will be prompted to end it.

updateicon() { \
    echo "$1" > /tmp/recordingicon
    pkill -RTMIN+9 i3blocks
    }

killrecording() {
    recpid="$(cat /tmp/recordingpid)"
    # kill with SIGTERM, allowing finishing touches.
    kill -15 "$recpid"
    rm -f /tmp/recordingpid
    updateicon ""
    pkill -RTMIN+9 i3blocks
    # even after SIGTERM, ffmpeg may still run, so SIGKILL it.
    sleep 3
    kill -9 "$recpid"
    exit
    }

screencast() { \
    ffmpeg -y \
    -f x11grab \
    -framerate 60 \
    -s $(xdpyinfo | grep di…