Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below.
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 && \
gnthibault /
Created December 7, 2017 13:03 — forked from Era-Dorta/
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/
# 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 / 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:
# 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
gnthibault /
Created January 9, 2018 15:05
A few commands related to docker
mkdir dockerstuff
cd dockerstuff
echo "FROM ubuntu" Dockerfile
docker build -t testproj .
# Interactive run
#docker run -it ubuntu
gnthibault /
Created January 10, 2018 14:20 — forked from narate/
Create Wi-Fi Hotspot on Linux using nmcli

Create a Wi-Fi hotspot on Linux using nmcli

Original post :

nmcli con add type wifi ifname wlan0 con-name Hostspot autoconnect yes ssid Hostspot
nmcli con modify Hostspot 802-11-wireless.mode ap bg ipv4.method shared
nmcli con modify Hostspot wifi-sec.key-mgmt wpa-psk
nmcli con modify Hostspot wifi-sec.psk "veryveryhardpassword1234"
gnthibault /
Last active May 25, 2024 12:29
Configuration of linux box for remote observatory with indi/indiwebmanager/vnc/webvnc, ...
# Instalation guide
### solve locale problem on computer
export LC_ALL="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
sudo dpkg-reconfigure locales
### Setup automatic time update toward UTC
sudo apt-get install ntp
gnthibault / InstallArmbianGuide.txt
Created January 23, 2018 09:54
Guide d'installation pour armbian sur une carte SD
D'abord, decompresser l'image:
cd chemin_vers_armbian_image
tar -xvf ./Armbian_5.27_S9xxx_Ubuntu_xenial_3.14.29_mate_KODI_20170702.img.xz
Cela decompresse l'archive, ensuite effectuer une copie "raw" de cette image sur la carte SD:
sudo dd if=/chemin_vers_/Armbian_5.27_S9xxx_Ubuntu_xenial_3.14.29_mate_KODI_20170702.img of=/dev/mmcblk0 status=progress bs=4M
Une fois l'operation terminee (plusieurs minutes), retirer et remettre la carte SD dans l'ordinateur, afin de pouvoir monter les deux partitions automatiquement (ou alors les monter manuellement)
Jeter un coup d'oeil dans BOOT:
eventuellement modifier le fichier armbian_first_run.txt (non obligatoire)
gnthibault /
Created January 25, 2018 09:05
git TIPS
#How to ignore a file locally in GIT
#Patterns which are specific to a particular repository but which do not need to be shared with other related repositories (e.g., auxiliary files that live inside the repository but are specific to one user's workflow) should go into the $GIT_DIR/info/exclude file.
gnthibault / .vimrc
Last active May 2, 2018 06:40
Google vimrc for python
"dein Scripts-----------------------------
if &compatible
set nocompatible " Be iMproved
" Required:
set runtimepath+=/home/gnthibault/.vim/bundle/repos/
" Required:
if dein#load_state('/home/gnthibault/.vim/bundle')