Skip to content

Instantly share code, notes, and snippets.

View rubenerd's full-sized avatar

Ruben Schade rubenerd

View GitHub Profile
@rubenerd
rubenerd / sysctl.conf
Created December 17, 2015 00:11
A slightly paranoid FreeBSD sysctl.conf
######
## Ruben's /etc/sysctl.conf
## 2015-05-15
## Silently drop packets received on closed ports (black hole)
net.inet.tcp.blackhole=2
net.inet.udp.blackhole=1
## Randomise packets
net.inet.ip.random_id=1
@rubenerd
rubenerd / exists.sh
Created August 17, 2015 05:53
Cross-platform command exists check (no bashisms)
#!/bin/sh
function exists() {
return command -v "$1" > /dev/null 2>&1
}
@rubenerd
rubenerd / freebsd-serverbear-deps.sh
Last active April 8, 2021 22:15
FreeBSD Serverbear dependencies
#!/bin/tcsh
## Their default script breaks. You can use pieces.
set origin = 'your_cloud_or_vps_vendor'
set plan = 'your_instance_plan_name'
set contact = 'your_email'
pkg update
pkg install -y curl dpkg expat fio ioping traceroute wget
@rubenerd
rubenerd / bsd-mac-address.sh
Last active April 8, 2021 22:15
Get MAC address of specified interface on BSD
#!/bin/sh
ifconfig ${1} | grep ether | cut -d ' ' -f2
@rubenerd
rubenerd / resursive-ln.sh
Created January 24, 2015 08:37
Recursively build directory of symlinks
#!/bin/sh
## Recursively build directory of symlinks
## Subdirectories also symlinked
## Desirable if you want to add files at root level
root=/some/directory
destination=.
for file in ${root}/*; do
@rubenerd
rubenerd / load-ssh-agent.sh
Last active June 13, 2018 05:53
Load ssh-agent
# ssh-agent sets variables
eval $(ssh-agent)
@rubenerd
rubenerd / goodbye-github.md
Created June 6, 2018 06:43
Goodbye, GitHub.

With Microsoft's purchase, I'll be looking at replacements. Maybe a "random scripts" repo hosted elsewhere.

I'll link to it here once set up. Cheers Gists, we had a good run.

@rubenerd
rubenerd / gpdr.md
Last active June 2, 2018 00:07
"We've updated our privacy policy!"

A very rough copy+pasta job for privacy policy updates received by coworkers and I. I thought it'd be fun to run Wordle or something against it to find the most common words and phrases used.


Singapore Airlines Krisflyer

We have updated our Privacy Policy and the KrisFlyer Terms & Conditions to be in line with the new European Union (EU) General Data Protection Regulation (GDPR) from 25 May 2018.


Blubrry

We know we’re not the first, second or third email you’ve received from a company about its updated privacy policy because of changes from the EU concerning data protection regulation. But, we’ve gotta do it. Read below to learn about what we’ve done.

@rubenerd
rubenerd / vim-lite.log
Created May 2, 2018 22:36
Last version of vim-lite in FreeBSD ports, before vim-console
vim-lite-8.0.1000
Name : vim-lite
Version : 8.0.1000
Installed on : Tue Aug 29 21:29:33 2017 AEST
Origin : editors/vim-lite
Architecture : FreeBSD:11:amd64
Prefix : /usr/local
Categories : editors
Licenses : VIM
Maintainer : adamw@FreeBSD.org
@rubenerd
rubenerd / xfce-dropbox.sh
Created April 24, 2018 00:43
Fix Dropbox on Xfce
dropbox stop
dbus-launch dropbox start