package main
import "fmt"
func Normal(s string) string {
fmt.Println(&s)
return s
}
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
#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 |
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
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 |
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
git config --global core.editor "code --wait" | |
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
{ | |
"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" | |
}, |
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
Tab: history-search-backward | |
set completion-ignore-case On | |
"\e[A": history-search-backward | |
"\e[B": history-search-forward |
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
''' | |
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' |
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
''' | |
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' |
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
items = range(0,10001) | |
def iter_group(iterable, batch_size:int): | |
iterable_type = type(iterable) | |
length = len(iterable) | |
start = batch_size*-1 | |
end = 0 | |
while(end < length): | |
start += batch_size | |
end += batch_size |
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
seconds_verb = ( | |
(29030400,'year'), | |
(2419200,'month'), | |
(604800,'week'), | |
(86400,'day'), | |
(3600,'hour'), | |
(60,'minute'), | |
(1,'second') | |
) |