Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
amor fati

Jay Dee pocoz

💭
amor fati
  • Marketplace
  • Moscow
View GitHub Profile
@pocoz
pocoz / prepare-commit-msg
Created Jul 29, 2021
Add branch name to the beginning of the commit message
View prepare-commit-msg
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test release)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"
BRANCH_EXCLUDED=$(printf "%s\n" "${BRANCHES_TO_SKIP[@]}" | grep -c "^$BRANCH_NAME$")
BRANCH_IN_COMMIT=$(grep -c "\[$BRANCH_NAME\]" $1)
View Boot only console
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
View RTX 3070 Overclocking
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
View create deb
package main
import (
"log"
"os"
"github.com/goreleaser/nfpm"
_ "github.com/goreleaser/nfpm/deb"
)
@pocoz
pocoz / export-ble-infos.py
Last active May 2, 2019 — forked from Mygod/export-ble-infos.py
Export your Windows Bluetooth LE keys into Linux!
View export-ble-infos.py
#!/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'
@pocoz
pocoz / aes_cbc_pkcs5.go
Created Apr 10, 2019 — forked from hothero/aes_cbc_pkcs5.go
AES/CBC/PKCS5Padding implementation by Golang (can work with JAVA, C#, etc.)
View aes_cbc_pkcs5.go
package main
import (
"bytes"
"crypto/aes"
"crypto/cipher"
"encoding/base64"
"fmt"
)
@pocoz
pocoz / protobuf
Last active Sep 13, 2018
install latest
View protobuf
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
View Go .profile
export GOPATH=$HOME/go
export GOROOT=/usr/local/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
View Docker no sudo
sudo setfacl -m user:$USER:rw /var/run/docker.sock
sudo chmod 777 /var/run/docker.sock