This file contains hidden or 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 | |
| kubectl patch deployment ${@} -p ' | |
| { | |
| "spec": { | |
| "template": { | |
| "metadata": { | |
| "annotations": { | |
| "date": "'$(date +%s)'", | |
| "user": "'$USER'" |
This file contains hidden or 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 | |
| AVG_COUNT="${AVG_COUNT:-10}" | |
| FACTOR="${FACTOR:-2}" | |
| LOOPTIME="${LOOPTIME:-1}" | |
| FULL_URL="${1}" | |
| SNI="$(printf '%s' ${FULL_URL} | awk -F[/:] '{print $4}')" | |
| TARGETS=($(dig +short ${SNI})) | |
| export AVG_COUNT FACTOR LOOPTIME TARGETS |
This file contains hidden or 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 ( | |
| "fmt" | |
| "html" | |
| ) | |
| func main() { | |
| // Hexadecimal ranges from: http://unicode.myseosolution.de/ | |
| emoji := [][]int{ |
This file contains hidden or 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/sh -ex | |
| _sudo="" | |
| [ $(id -u) != 0 ] && export _sudo="sudo" | |
| $_sudo dbus-launch gsettings set org.gnome.settings-daemon.plugins.sharing active true | |
| $_sudo dbus-launch gsettings set org.gnome.settings-daemon.plugins.sharing.service:/org/gnome/settings-daemon/plugins/sharing/vino-server/ enabled-connections "[ $(nmcli -t -f uuid,type c s --active | grep 802 | awk -F ":" '{ print "'\''" $1 "'\''" }' | paste -s -d, -) ]" | |
| $_sudo dbus-launch gsettings set org.gnome.Vino authentication-methods "['vnc']" |
First step: install tpm2-tss, tpm2-tools and all its depedencies.
# Install dependencies
sudo apt-get update && sudo apt-get -y install autoconf autoconf-archive automake libtool pkg-config gcc libssl-dev libcurl4-gnutls-dev doxygen
# Install tpm2-tss
git clone https://github.com/tpm2-software/tpm2-tss.git
cd tpm2-tss
git checkout e05d28ec # I used this particular commit
./bootstrap
This file contains hidden or 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/sh | |
| kubectl patch ${@} -p '{"spec":{"template":{"metadata":{"annotations":{"date":"'$(date +%s)'"}}}}}' |
This file contains hidden or 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
| // A small SSH daemon providing bash sessions | |
| // | |
| // Server: | |
| // cd my/new/dir/ | |
| // #generate server keypair | |
| // ssh-keygen -t rsa | |
| // go get -v . | |
| // go run sshd.go | |
| // | |
| // Client: |
This file contains hidden or 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 | |
| # aic94xx-firmware wd719x-firmware byobu pam_wrapper fprintd-libfprint2 libfprint-git | |
| set -xeuo pipefail +v; | |
| PACKAGE="${1}"; | |
| AUR_REPO="https://aur.archlinux.org/${PACKAGE}.git"; | |
| mkdir -vp /usr/local/src; |