Skip to content

Instantly share code, notes, and snippets.

View jbhannah's full-sized avatar
🏳️‍⚧️
she/her

Jesse Brooklyn Hannah jbhannah

🏳️‍⚧️
she/her
View GitHub Profile
@jbhannah
jbhannah / he-ipv6.sh
Created May 23, 2011 17:51
Hurricane Electric IPv6 Tunnel Broker script for Ubuntu
#!/bin/sh
# Hurricane Electric IPv6 Tunnel Broker script for Ubuntu
# /etc/network/if-up.d/he-ipv6.sh
# Written by Jesse B. Hannah (http://jbhannah.net) <jesse@jbhannah.net>
# Based on instructions provided by Hurricane Electric (http://tunnelbroker.net)
###
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@jbhannah
jbhannah / dropbox-setup.sh
Created May 23, 2011 03:51
Dropbox setup on a headless Ubuntu Server (http://wp.me/pnbL6-5F)
#!/bin/sh
# Dropbox setup on a headless Ubuntu Server
# Script written by Jesse B. Hannah (http://jbhannah.net) <jesse@jbhannah.net>
# Based on http://wiki.dropbox.com/TipsAndTricks/UbuntuServerInstall
###
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@jbhannah
jbhannah / v6.php
Created May 23, 2011 03:38
Simple PHP IPv6 detection script (http://wp.me/pnbL6-6a)
<?php
header('Content-type: application/json');
if ( array_key_exists('addr', $_GET) )
$ip = $_GET['addr'];
else
$ip = $_SERVER['REMOTE_ADDR'];
$v6 = preg_match("/^[0-9a-f]{1,4}:([0-9a-f]{0,4}:){1,6}[0-9a-f]{1,4}$/", $ip);
$v4 = preg_match("/^([0-9]{1,3}\.){3}[0-9]{1,3}$/", $ip);
@jbhannah
jbhannah / cloudSettings
Last active May 6, 2020 05:40
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-05-06T05:40:16.002Z","extensionVersion":"v3.4.3"}
@jbhannah
jbhannah / Procfile
Last active May 10, 2017 06:50
Jekyll on Heroku without Rack::Jekyll or custom buildpacks
web: bundle exec puma -p $PORT config.ru

Keybase proof

I hereby claim:

  • I am jbhannah on github.
  • I am jbhannah (https://keybase.io/jbhannah) on keybase.
  • I have a public key ASB9JHol_MFWircNwOKm13AOffRHuk86z_-bS98qtPwttQo

To claim this, I am signing this object:

@jbhannah
jbhannah / skype_status.php
Created May 23, 2011 05:14
Skype status PHP script for use with AJAX
<?php
header('Content-type: application/json');
if ( array_key_exists('username', $_GET) )
$user = $_GET['username'];
else
$user = "";
$curl = curl_init("http://mystatus.skype.com/${user}.num");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
@jbhannah
jbhannah / wow_char_api.php
Created August 7, 2011 00:04
World of Warcraft community API character data fetcher
<?php
header('Content-type: application/json');
if ( array_key_exists('char', $_GET) && array_key_exists('realm', $_GET) ) {
$char = $_GET['char'];
$realm = $_GET['realm'];
} else {
echo json_encode(array());
return;
}
@jbhannah
jbhannah / gist:1052145
Created June 28, 2011 20:39
Plaintext output with header row to Ruby hash
processes = []
psef = []
`ps -ef`.lines.each { |r| psef << r }
headers = psef.shift.split
psef.each do |row|
row = row.split
p = {}
@jbhannah
jbhannah / rotate.desktop
Created May 23, 2011 05:24
ThinkPad X60 Tablet Ubuntu setup scripts
[Desktop Entry]
Type=Application
Exec=rotate.py monitor
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en_US]=Monitor Screen Rotation
Name=Monitor Screen Rotation
Comment[en_US]=Monitor the rotation of the display and rotate the screen to match.
Comment=Monitor the rotation of the display and rotate the screen to match.