Skip to content

Instantly share code, notes, and snippets.

View egg82's full-sized avatar

egg82

View GitHub Profile

Keybase proof

I hereby claim:

  • I am egg82 on github.
  • I am egg82 (https://keybase.io/egg82) on keybase.
  • I have a public key whose fingerprint is BEC0 512C 1647 E114 B701 AC5D 0836 D568 33B8 F0F7

To claim this, I am signing this object:

@egg82
egg82 / build_kernel.sh
Created December 19, 2016 18:12
Build Latest GrSec KErnel (Cron-able)
#!/bin/bash
verify_sig() {
local file=$1 out=
if out=$(gpg --status-fd 1 --verify "$file" 2>/dev/null) &&
echo $out | grep "\[GNUPG:\] VALIDSIG" | grep "\[GNUPG:\] GOODSIG" | grep -qsv "\[GNUPG:\] TRUST_NEVER"; then
return 0
else
echo "$out" >&2
return 1
@egg82
egg82 / Clean Old GrSec Kernel files
Created December 19, 2016 18:15
clean_kernel.sh
#!/bin/bash
currentkernelver=`uname -r | cut -d - -f 1`
echo "Removing old modules.."
for n in /boot/*; do
n2=`echo "$n" | cut -d - -f 2`
if [ $n2 != $currentkernelver ]; then
rm -f $n
@egg82
egg82 / kernel_upgrade.sh
Created December 19, 2016 18:19
Apply New Kernel Debs (Cron-able)
#!/bin/bash
cd /mnt/build-bucket/grsec-kernel/
last=`ls -t linux-headers-*.deb | xargs -L 1 basename | sed -n 1p`
version=`echo $last | cut -d - -f 3`
currentversion=`uname -r | cut -d - -f 1`
pkg=`echo "linux-*"$version"*.deb"`
if [ $version == $currentversion ]; then
@egg82
egg82 / gist:816734033f004426f883c81438979a83
Last active December 19, 2016 18:22
GrSec Build Prereqs (Run as root)
cd ~
gpg --recv "DE94 52CE 46F4 2094 907F 108B 44D1 C0F8 2525 FE49"
gpg --recv "D2E0 B4B6 16A3 B532 20B8 969B 956D 2366 39F0 81BF"
gpg --recv "647F 2865 4894 E3BD 4571 99BE 38DB BDC8 6092 693E"
gpg --recv "ABAF 11C6 5A29 70B1 30AB E3C4 79BE 3E43 0041 1886"
apt-get -y install build-essential libncurses5-dev gcc-4.8-plugin-dev libssl-dev
#!/bin/bash
NOTIFYEMAIL="you@gmail.com"
check_ip() {
s=0
for i in {1..20}
do
r=$( hping3 -c 1 -S -p $2 $1 |& grep "packet loss" | cut -d " " -f 7 | rev | cut -c 2- | rev )
s=$((s+$r))
#!/bin/bash
rm -f BuildTools.jar
wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
build() {
version=$1
mkdir -p $version
mkdir -p Build-$version
cd Build-$version
import re
import os
import bz2
import lzma
import zstandard as zstd
import json
import sys
import html
import shutil
@egg82
egg82 / zsh-plugins.md
Last active December 31, 2019 20:56
ZSH plugins
TERM="xterm-256color"
POWERLEVEL9K_MODE="nerdfont-complete"
POWERLEVEL9K_DISABLE_PROMPT=true
POWERLEVEL9K_PROMPT_ON_NEWLINE=false
ZSH_THEME="powerlevel9k/powerlevel9k"

...

plugins=(
@egg82
egg82 / telegraf-qnap.conf
Created October 2, 2020 03:56
QNAP Telegraf config
[[inputs.snmp]]
agents = [ "10.0.0.5:161"]
interval = "45s"
timeout = "10s"
retries = 3
max_repetitions = 10
version = 2
community = "616a1b353f21d9495ffe536656f110299a27712a63fd4ae"
name = "snmp.NAS"