Restore GRUB

Mount the linux partition, chroot to it, run grub-update. Or: fdisk -l list of physical devices (X) and partitions (Y) (or blkid) mount /dev/sdXY /mnt umount /mnt/boot and mount /dev/sdXY /mnt/boot if you have a separate boot partition grub-install --boot-directory=/mnt/boot /dev/sdX (Given you have access to a busybox/linux shell)

SCP through SSH

Here’s how to run scp to copy from machine A to machine R, which is only accessible through gateway machine G. A -G-> R Set up SSH tunnel: ssh -L 1234:<address of R known to G>:22 <user at G>@<address of G> Adding “cat -” will keep it running while above will get you connected to G: ssh -L 1234:<address of R known to G>:22 <user at G>@<address of G> cat - Either way you run it, open another terminal for next step....

Steam: Source-based games not starting

Confirmed to help with Portal, The Stanley Parable with these errors on start: error while loading shared libraries: libtcmalloc_minimal.so.4: cannot open shared object file: No such file or directory error while loading shared libraries: libtcmalloc_minimal.so.4: wrong ELF class: ELFCLASS64 SDL failed to create GL compatibility profile (whichProfile=0! SDL failed to create GL compatibility profile (whichProfile=0! Be sure to have these libraries installed: libtcmalloc-minimal4:i386 libtxc-dxtn-s2tc0:i386 libstdc++. Rename every occurency of the file libstdc++....

Tracking configuration files

Manually setup a git repo in /etc or take a look at the etckeeper package. Don’t use a public repository, /etc can expose sensitive data such as password hashes or private keys. apt get install etckeeper git incrontab nano /etc/etckeeper/etckeeper.conf , set VCS="git" (comment the other options) and set PUSH_REMOTE="origin". # Go to the configuration directory. cd /etc # Initialize etckeeper. etckeeper init # Add the remote repository. git remote add origin git@HOSTNAME:REPONAME # First commit....

Use Jupyter inside a virtual env

Use Jupyter inside a virtual env python -m venv projectname source projectname/bin/activate (venv) $ pip install ipykernel (venv) $ ipython kernel install --user --name=projectname