Skip to content

Instantly share code, notes, and snippets.

Avatar
🕵️
Up in ur networks sniffin' ur packets

Den Stroebel stroebs

🕵️
Up in ur networks sniffin' ur packets
  • London, UK
View GitHub Profile
@stroebs
stroebs / kernel-cleanup.sh
Created Jan 10, 2018
Ubuntu Kernel cleanup one-liner
View kernel-cleanup.sh
for kernel in `dpkg -l | tail -n +6 | grep -E 'linux-image-[0-9]+' | grep -Fv $(uname -r) |grep "ii" |awk '{print $2}'` ; do dpkg --purge $kernel; done
@stroebs
stroebs / make-chr.sh
Last active Oct 17, 2021
Install Mikrotik CHR on a Digital Ocean droplet (Ubuntu 18.04 tested working 31/03/2021)
View make-chr.sh
#!/bin/bash
#
# Digital Ocean Ubuntu 18.04 x64 Droplet with "Regular Intel" CPU.
# Running:
# git clone https://gist.github.com/54fc09734a3911e91eeeb43434f117df.git
# cd 54fc09734a3911e91eeeb43434f117df/
# chmod +x make-chr.sh
# ./make-chr.sh
#
# Once the reboot is done, login with root/CHANGEME and change the password!
@stroebs
stroebs / backup-daily.sh
Created Oct 28, 2017
Simple tar + rsync backup method
View backup-daily.sh
#!/bin/bash
DATE=$(date +%Y%m%d)
FILE="backup-$DATE.tar.gz"
LOG="/tmp/backup-$DATE.log"
RSYNC_PASSWORD="supersecret"
RSYNC_CMD="-a --delete /$FILE rsync://backup-user@backup-server.tld:/backup-dir/daily/"
export RSYNC_PASSWORD=$RSYNC_PASSWORD
cd /
tar -cpzf $FILE \
--exclude=/*.tar.gz \
@stroebs
stroebs / cloudflare-update-record.sh
Created Apr 9, 2016 — forked from benkulbertis/cloudflare-update-record.sh
Cloudflare API v4 Dynamic DNS Update in Bash
View cloudflare-update-record.sh
#!/bin/bash
# CHANGE THESE
auth_email="user@example.com"
auth_key="c2547eb745079dac9320b638f5e225cf483cc5cfdda41" # found in cloudflare account settings
zone_name="example.com"
record_name="www.example.com"
# MAYBE CHANGE THESE
ip=$(curl -s http://ipv4.icanhazip.com)