Skip to content

Instantly share code, notes, and snippets.

@gnthibault
gnthibault / fstab
Last active December 1, 2020 17:25
Example fstab for cifs/sshfs/nfs
# CIFS with password in clear, or in a file
# content of /home/user/.smbcredentials looks like this:
# username=user.name
# password=password
# domain=WORKSPACE
//smbservername/foldername /home/user/foldername cifs uid=username,rw,user=smbuser,password=smbpassword,vers=3.0 0 0
//smbservername/foldername /home/user/foldername cifs uid=username,rw,credentials=/home/user/.smbcredentials,vers=3.0 0 0
# SSHFS
@gnthibault
gnthibault / create-efi-keys.sh
Created December 7, 2017 13:03 — forked from Era-Dorta/create-efi-keys.sh
Sign kernel modules on Ubuntu, useful for Nvidia drivers in UEFI system
# VERY IMPORTANT! After each kernel update or dkms rebuild the modules must be signed again with the script
# ~/.ssl/sign-all-modules.sh
# Place all files in ~/.ssl folder
mkdir ~/.ssl
cd ~/.ssl
# Generate custom keys with openssl
openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -subj "/CN=Owner/"
@gnthibault
gnthibault / how-to-install-latest-gcc-on-ubuntu-lts.txt
Created December 4, 2017 07:34 — forked from application2000/how-to-install-latest-gcc-on-ubuntu-lts.txt
How to install latest gcc on Ubuntu LTS (12.04, 14.04, 16.04)
These commands are based on a askubuntu answer http://askubuntu.com/a/581497
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below.
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.
ABSOLUTELY NO WARRANTY.
If you are still reading let's carry on with the code.
sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.