Skip to content

Instantly share code, notes, and snippets.

@tntim96
tntim96 / grub-default-kernel.txt
Created April 21, 2018 01:20
Change default kernel
#Backup
cp /etc/default/grub .
#Get Menu ID (e.g. gnulinux-4.1-3)
less /boot/grub/grub.cfg
# Search for 4.1.3 and you'll find a menu entry with a top level menu like:
# submenu 'Advanced options for LMDE 2 Cinnamon 64-bit' $menuentry_id_option 'gnulinux-advanced-8a212f21-6d7d-49d8-8aba-fe25fa79441f'
# menuentry 'LMDE 2 Cinnamon 64-bit, with Linux 4.1-3.dmz.1-liquorix-amd64' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.1-3.dmz.1-liquorix-amd64-advanced-8a212f21-6d7d-49d8-8aba-fe25fa79441f'
# Combine those entries to get 'parent-sub-menu-id>sub-menu-id', i.e.:
# 'gnulinux-advanced-8a212f21-6d7d-49d8-8aba-fe25fa79441f>gnulinux-4.1-3.dmz.1-liquorix-amd64-advanced-8a212f21-6d7d-49d8-8aba-fe25fa79441f'
@tntim96
tntim96 / grub-remove-kernel.txt
Created April 21, 2018 01:35
Remove Old Grub Kernel
# Find current kernel - and don't remove that
uname -r
# List kernels
dpkg --list | grep linux-image
# Remove kernel
sudo apt-get purge linux-image-3.16.0-4-amd64
@tntim96
tntim96 / gist:07126786110a4d57cfc8b99bb48dac03
Created May 12, 2018 02:22
View manifest of JAR from command line
unzip -q -c ~/.m2/repository/com/google/javascript/closure-compiler/v20180506/closure-compiler-v20180506.jar META-INF/MANIFEST.MF
ffmpeg -i input.mp4 -vf scale=720:480 -c:v libx264 -crf 18 -refs 5 -c:a copy output.mp4

AI Setup

NVIDIA CUDA on Linux

The instructions below are for Debian. I run LMDE3 with Cinnamon, and I found using the latest CUDA and NVIDIA drivers broke Cinnamon, causing it to run in fall-back mode. This is still not working - the roll-back steps are given below.

  1. Check that you've got an NVIDIA device lspci | grep -i nvidia
  2. Verify your device supports CUDA
  3. Ensure your drivers are loaded - if not run sudo apt-get install nvidia-driver nvidia-smi
  4. Determine your driver version using nvidia-smi (in my case 390.87)