Skip to content

Instantly share code, notes, and snippets.

View nexus166's full-sized avatar
🌪️
🐧

nexus166

🌪️
🐧
  • Earth
View GitHub Profile
#!/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;
@nexus166
nexus166 / sshd.go
Created February 23, 2020 17:07 — forked from jpillora/sshd.go
Go SSH server complete example - Read more here https://blog.gopheracademy.com/go-and-ssh/
// 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:

Problem

In Arch Linux mkinitcpio -p linux

shows

Possibly missing firmware for module: aic94xx
 Possibly missing firmware for module: wd719x
#!/bin/sh
kubectl patch ${@} -p '{"spec":{"template":{"metadata":{"annotations":{"date":"'$(date +%s)'"}}}}}'
@nexus166
nexus166 / tpm2.0-fulldisk-decryption-at-boot.md
Created January 21, 2020 13:28 — forked from stengoes/tpm2.0-fulldisk-decryption-at-boot.md
Setup TPM2.0 for full disk decryption at boot

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
#!/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']"
@nexus166
nexus166 / emoji.go
Last active November 5, 2019 02:27 — forked from YamiOdymel/emoji.go
golang codepage emojis
package main
import (
"fmt"
"html"
)
func main() {
// Hexadecimal ranges from: http://unicode.myseosolution.de/
emoji := [][]int{
#!/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
@nexus166
nexus166 / kube-reload.sh
Created October 30, 2019 20:53
kube-deployment-reload.sh
#!/usr/bin/env bash
kubectl patch deployment ${@} -p '
{
"spec": {
"template": {
"metadata": {
"annotations": {
"date": "'$(date +%s)'",
"user": "'$USER'"