Skip to content

Instantly share code, notes, and snippets.

View reidransom's full-sized avatar

Reid Ransom reidransom

View GitHub Profile
@reidransom
reidransom / gist:6042016
Created July 19, 2013 20:13
Auto-starting VirtualBox VMs on OS X

Auto-starting VirtualBox VMs on OS X

After finding a lot of other posts on the topic that didn't work out for me this one did the trick so I'm reposting for my own sense of self preservation.

Link to original article.

Copy the Virtualbox autostart plist template file to your system's LaunchDaemons folder.

sudo cp \

/Applications/VirtualBox.app/Contents/MacOS/org.virtualbox.vboxautostart.plist \

@reidransom
reidransom / gist:6033227
Last active May 13, 2024 13:13
Configure Zeroconf on FreeBSD

Configure Zeroconf on FreeBSD

Install avahi-app and nss_mdns. Note: avahi-app is chosen over avahi because avahi depends on X11.

$ cd /usr/ports/net/avahi-app
$ sudo make config-recursive
$ sudo make install clean
$ cd /usr/ports/dns/nss_mdns
$ sudo make config-recursive

$ sudo make install clean

@reidransom
reidransom / gist:6011044
Last active December 19, 2015 20:08
Configure manual ip on freebsd

Configure manual ip on FreeBSD

Add these lines to your /etc/rc.conf

ifconfig_em0="inet 192.168.0.10 netmask 255.255.255.0"
defaultrouter="192.168.0.1"
hostname="hostname.domain.com"

You may need to run ifconfig to get the name of your network interface like this:

@reidransom
reidransom / gist:6010819
Last active December 19, 2015 20:08
Copy a public ssh key one-liner

Copy a public ssh key one-liner

$ ssh user@example.com 'mkdir -p .ssh && cat >> .ssh/authorized_keys' < ~/.ssh/id_rsa.pub

@reidransom
reidransom / gist:5920893
Created July 3, 2013 17:41
Scan local network with nmap
# Scan 192.168.1.0 thru 192.168.1.255
sudo nmap -sS 192.168.1.0/24
@reidransom
reidransom / gist:5771574
Created June 13, 2013 06:13
prevent osx from creating .ds_store files on network mounted drives
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
@reidransom
reidransom / mount_vbox
Last active December 17, 2015 23:19
Mount a virtualbox shared folder
mkdir ~/targetdir
sudo mount -t vboxsf -o uid=$UID,gid=$GID sharename ~/targetdir
@reidransom
reidransom / crawl_site
Last active August 15, 2018 22:00
Download an entire website with wget
wget \
--recursive \
--no-clobber \
--page-requisites \
--html-extension \
--convert-links \
--restrict-file-names=windows \
--domains website.org \
--no-parent \
www.website.org/tutorials/html/
@reidransom
reidransom / gist:5593151
Last active December 17, 2015 10:09
batch process files one liner
# this performs a sample rate conversion on a folder of .wav files
find . -maxdepth 1 -name '*.wav' -type f -print0 | xargs -0 -t -I {} sox {} -r 8000 8000Hz/{}
@reidransom
reidransom / handbrake540
Created February 2, 2013 05:43
Create a really nice variable bit-rate 540p h.264 mp4 using the HandBrakeCLI
#!/bin/bash
OF="${1}.mp4"
HandBrakeCLI -i "$1" -o "$OF" -e x264 -q 20 -E faac -B 256 -6 dpl2 -R Auto -D 0.0 -f mp4 --width 960 --height 540 --decomb --crop 0:0:0:0 --optimize -m -x cabac=0:ref=2:me=umh:bframes=0:weightp=0:subme=6:8x8dct=0:trellis=0