This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This way you can customize which branches should be skipped when | |
# prepending commit message. | |
if [ -z "$BRANCHES_TO_SKIP" ]; then | |
BRANCHES_TO_SKIP=(master develop test) | |
fi | |
BRANCH_NAME=$(git symbolic-ref --short HEAD) | |
BRANCH_NAME="${BRANCH_NAME##*/}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Just 'go get' at the commit hash you want: | |
go get github.com/someone/some_module@af044c0995fe | |
'go get' will correctly update the dependency files (go.mod, go.sum). | |
More information: https://github.com/golang/go/wiki/Modules#how-to-upgrade-and-downgrade-dependencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo nano /etc/default/grub | |
GRUB_CMDLINE_LINUX_DEFAULT="text" | |
GRUB_TERMINAL=console | |
sudo update-grub | |
sudo systemctl enable multi-user.target --force | |
sudo systemctl set-default multi-user.target | |
// Undo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo add-apt-repository ppa:graphics-drivers/ppa | |
sudo apt install ubuntu-drivers-common | |
sudo apt install nvidia-driver-{last-driver} | |
sudo reboot | |
nvidia-smi | |
sudo nano /etc/systemd/system/nvidia-powerlimit.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"crypto/aes" | |
"crypto/cipher" | |
"encoding/base64" | |
"fmt" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"log" | |
"os" | |
"github.com/goreleaser/nfpm" | |
_ "github.com/goreleaser/nfpm/deb" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo setfacl -m user:$USER:rw /var/run/docker.sock | |
sudo chmod 777 /var/run/docker.sock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
""" | |
Export your Windows Bluetooth LE keys into Linux! | |
Thanks to: http://console.systems/2014/09/how-to-pair-low-energy-le-bluetooth.html | |
Usage: | |
$ sudo apt install chntpw | |
$ python3 export-ble-infos.py | |
$ sudo bash -c 'cp -r ./bluetooth /var/lib && service bluetooth force-reload' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install autoconf automake libtool curl make g++ unzip -y | |
git clone https://github.com/google/protobuf.git | |
cd protobuf | |
git submodule update --init --recursive | |
./autogen.sh | |
./configure | |
make | |
make check | |
sudo make install | |
sudo ldconfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export GOPATH=$HOME/go | |
export GOROOT=/usr/local/go | |
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin |