Skip to content

Instantly share code, notes, and snippets.

being a dad

Jeff Larson thejefflarson

being a dad
View GitHub Profile
harrisj / tinyurl_test.rb
Created Apr 26, 2012
Testing Punctuation on URL Shorteners
View tinyurl_test.rb
require 'net/http'
# These links were taken from my twitter timeline. No endorsement implied.
tiny_urls = {
'bitly' => ['', ''],
'' => ['', ''],
'tinyurl' => ['', ''],
'owly' => ['', ''],
'' => ['', ''],
'' => ['', ''],
erikh /
Created Mar 31, 2012 — forked from DAddYE/
OSX For Hackers
#!/usr/bin/env sh
# This is script with usefull tips taken from:
# install it:
# curl -sL | sh
kleinmatic / ascii.txt
Created Mar 25, 2012
ASCII character 28. Used by the Federal Election Commission as a field delimiter, so it's useful when working with some FEC files. How to Use: Download or clone, open in any competent plain-text editor and use the regular means to add it to your clipboard
DAddYE /
Created Mar 19, 2012
OSX For Hackers
# This is a script with usefull tips taken from:
# Run in interactive mode with:
# $ sh -c "$(curl -sL"
# or run it without prompt questions:
zhm / gist:2005158
Last active Jul 22, 2020
Building GDAL 1.9 with ESRI FileGDB support on OS X Lion
View gist:2005158

Building GDAL 1.9.x with ESRI FileGDB support on OS X Lion

  • Download the SDK from ESRI's website
  • Extract the SDK, and put the contents of the directory in a known location, I used ~/local/filegdb. Here's an example path to one of the files: ~/local/filegdb/lib/libFileGDBAPI.dylib
  • I use ~/local/filegdb so it can stay isolated in it's own place. You can put it anywhere, but the next few steps might be different.
  • Go into the directory containing the FileGDB SDK, e.g. ~/local/filegdb
  • ESRI built these dylib's using @rpath's, so to avoid needing to mess with DYLD_LIBRARY_PATH, I updated the @rpath's using install_name_tool. There might be a more elegant way to handle this. If so, comments are welcome!
  • Here are the commands I used to patch the dylibs, this is not required if you want to use DYLD_LIBRARY_PATH yourself:
myersjustinc / mercator.html
Created Nov 14, 2011
Mercator scale factors by latitude
View mercator.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="">
<title>Mercator craziness</title>
<script type="text/javascript" src=""></script>
<script type="text/javascript">//<![CDATA[
var map;
var circles = [];
function degToRad(degrees) {return degrees * Math.PI / 180;}
View super.js
// Demonstration of dynamic super() calls.
// Because of JS reserved words, "ssuper()" is the method name,
// and is passed the current object, as well as the name of
// the current method.
function GreatGrandParent() {};
GreatGrandParent.prototype.method = function() {
console.log("In the GreatGrandParent.");
View gist:1159787
$ curl -I
HTTP/1.1 301 Moved Permanently
Date: Sat, 20 Aug 2011 22:53:39 GMT
Server: hi
Cache-Control: private,max-age=300
Expires: Sat, 20 Aug 2011 22:58:39 GMT
Connection: close
Content-Type: text/html; charset=UTF-8
tlrobinson / Makefile
Created Jun 25, 2011
Remote Makefiles fun
View Makefile
REMOTE_MAKE?=cat $(MAKEFILE) | $(REMOTE_SHELL) make -f /dev/stdin -C $(REMOTE_BASE)
ryanpitts / Hartnett Command Performance
Created May 11, 2011
Let your Mac read you the latest @wmhartnett updates from Twitter
View Hartnett Command Performance
read -a choices <<<'Agnes Kathy Princess Vicki Victoria Bruce Fred Junior Ralph Albert Bahh Bells Boing Bubbles Cellos Deranged Hysterical Trinoids Whisper Zarvox'; n=${#choices[*]}; voice=${choices[$((RANDOM%n))]}; curl | grep '<description>.*</description>' | sed -e 's/<\/*description>//g' -e 's/ \/ wmhartnett//g' -e 's/wmhartnett: //g' | say -v $voice