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/env bash | |
function _getArchiveName() { | |
_ext="$(echo "$@" | awk -F '.' '{print $NF}')" | |
_name="${*/.$_ext//}" | |
_name="${_name/\//}" | |
echo "$_name" | |
} | |
function _x() { |
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/env bash | |
# snag: colorize, bat, apt-file, apt-fast, toilet | |
alias aget='sudo apt-get install' | |
alias qaget='sudo apt-fast -y install' | |
alias aremove='sudo apt-get remove' | |
alias apurge='sudo apt-get purge' | |
alias ashow="_ashow" |
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/env bash | |
# example output: | |
# cleaning duplicate netfilter rules... | |
# updating netfilter rules... | |
# updating iptables... | |
# latest: SHA256 (-) = e32144dcf88d333d2ecfbce61fc2392045c462b3370093b70bd5429c3ae9e922 | |
# current: SHA256 (-) = e32144dcf88d333d2ecfbce61fc2392045c462b3370093b70bd5429c3ae9e922 | |
# backing up old rules... |
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 | |
// ▄─▄ ▄ ▄ ▄ ──▄ ▄─▄ ▄─▄ | |
// ▓─ ▓ ▓ ▓ ▓ ▓ ▀─▄ ▀─▄ | |
// ▀ ▀─▀─▀ ──▀ ▀─▀ ▀─▀ | |
// f w d --> 5 5 | |
// | |
// simple rfc1928 proxy server | |
// | |
// |
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/env bash | |
# included shebang for completeness but likely you'd wanna tack this onto a profile or bashrc, something that gets sourced by your shell | |
function isDir() { | |
if [ -d "$1" ]; then return 0; else | |
echo "$1 is not a directory, bail" | |
return 1 | |
fi | |
} | |
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
apt-get update; apt-get -y full-upgrade; apt-get -y install git curl wget ca-certificates curl gnupg lsb-release; mkdir -m 0755 -p /etc/apt/keyrings && rm /etc/apt/keyrings/docker.gpg; curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null && apt-get -y update && apt-get -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin; docker run hello-world |
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/env bash | |
_port=${LXD_PORT:-"8443"} | |
_fqdn=${LXD_FQDN:-"ebaumsworld.com"} | |
set -e | |
function req { | |
go version || return 1 | |
git version || return 1 | |
ssh -V || return 1 | |
} | |
req || exit 1 |
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
while :; do data="$(sensors | grep Tctl | awk '{print $2}' | tr -d '+' | awk -F '.' '{print $1}')"; case $data in 4[0-9]) col="blue" ;; 5[0-9]) col="green" ;; 5[0-9]) col="green" ;; 6[0-9]) col="yellow" ;; 7[0-9]) col="red" ;; 8[0-9]) col="red" ;; 9[0-9]) col="red" ;; *) col="white" ;; esac ; out="$(echo "$data°C" | toilet -f fig.mono12 | colorize $col/black --attr bold)"; clear; echo "$out"; sleep 0.5; done |
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 ( | |
"os" | |
"strconv" | |
"golang.org/x/sys/unix" | |
) | |
func getBaudRate(name string) (int, error) { |
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
{ | |
"name": "GitHub Go Search", | |
"description": "Add Golang GitHub results to your search engines", | |
"version": "0.1", | |
"manifest_version": 2, | |
"icons": { | |
"20": "icon.svg", | |
"48": "icon.svg", | |
"96": "icon.svg" |
NewerOlder