Skip to content

Instantly share code, notes, and snippets.

View codeliger's full-sized avatar

Ben codeliger

  • Canada
View GitHub Profile
@codeliger
codeliger / grub.cfg.diff
Created January 3, 2022 00:52
grub.cfg.diff
diff --git a/mnt/boot/grub/grub.cfg b/mnt/archliger/boot/grub/grub.cfg
old mode 100755
new mode 100644
index e0a49aa..64876ae
--- a/mnt/boot/grub/grub.cfg
+++ b/mnt/archliger/boot/grub/grub.cfg
@@ -85,7 +85,7 @@ if loadfont $font ; then
load_video
insmod gfxterm
set locale_dir=$prefix/locale
@codeliger
codeliger / NetworkManager.conf
Created January 28, 2020 16:34
Use resolvconf for dns
[main]
plugins=ifupdown,keyfile
dns=default
rc-manager=resolvconf
[ifupdown]
managed=false
[device]
wifi.scan-rand-mac-address=no
package main

import "fmt"

func Normal(s string) string {
    fmt.Println(&s)
    return s
}
@codeliger
codeliger / grub.sh
Last active December 31, 2021 03:41
#ensure you are booted into UEFI mode through the motherboards boot menu
# test if efi mode in bash:
# [ -d /sys/firmware/efi ] && echo UEFI || echo BIOS
# list devices
lsblk -f
# decrypt the encrypted disk/volume
sudo cryptsetup luksOpen /dev/nvme0n1p2 archliger
@codeliger
codeliger / restore_grub_manjaro.txt
Created December 8, 2019 08:33 — forked from greginvm/restore_grub_manjaro.txt
Restore GRUB in UEFI + LVM + LUKS setup (Manjaro)
Setup: UEFI, LVM + LUKS encrypted drive
Bootloader: Grub
Links:
- https://wiki.manjaro.org/index.php/Restore_the_GRUB_Bootloader
-
Restore GRUB (boot into live env):
# get the encrypted partition (crypto_LUKS)
lsblk -f
@codeliger
codeliger / tricks.sh
Created September 6, 2019 01:40
Notes
git config --global core.editor "code --wait"
@codeliger
codeliger / go.json
Last active August 23, 2019 19:13
go user snippets
{
"For Loop": {
"prefix": "for",
"body": [
"for ${1:i} := ${2:0}; ${1:i} ${3:<} ${4:INTEGER}; ${1:i}${5:++} {",
"\t$0",
"}"
],
"description": "Create a standard for loop"
},
Tab: history-search-backward
set completion-ignore-case On
"\e[A": history-search-backward
"\e[B": history-search-forward
@codeliger
codeliger / upgrade.py
Created March 17, 2019 02:33
pip upgrade all packages
'''
Upgrades all pip packages to the latest version
'''
from subprocess import check_output, call
import json
PYTHON_VERSION = '3.7'
CMD_OUTDATED_PACKAGES = f'python -m pip list --format json -o'
'''
Upgrades all pip packages to the latest version
'''
from subprocess import check_output, call
import json
VERSION = '3.7'
CMD_OUTDATED_PACKAGES = f'python -m pip list --format json -o'