Skip to content

Instantly share code, notes, and snippets.

💭
Migrated to GitLab

Denys Stroebel stroebs

💭
Migrated to GitLab
  • South Africa
Block or report user

Report or block stroebs

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
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 Nov 19, 2019
Install Mikrotik CHR on a Digital Ocean droplet (Ubuntu 16.04.6 tested working 31/08/2019)
View make-chr.sh
#!/bin/bash
#
# Digital Ocean Ubuntu 16.04.6 Droplet
# Running:
# wget https://gist.githubusercontent.com/stroebs/54fc09734a3911e91eeeb43434f117df/raw/1ede2fb162d404171122db0c84a9eeea468a92cd/make-chr.sh
# chmod +x make-chr.sh
# ./make-chr.sh
#
wget http://download2.mikrotik.com/routeros/6.37/chr-6.37.img.zip -O chr.img.zip && \
gunzip -c chr.img.zip > chr.img && \
@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)
You can’t perform that action at this time.