Skip to content

Instantly share code, notes, and snippets.

@hamtie
hamtie / keybase.md
Created December 13, 2016 03:41
keybase.md

Keybase proof

I hereby claim:

  • I am hamtie on github.
  • I am hamtie (https://keybase.io/hamtie) on keybase.
  • I have a public key whose fingerprint is 3AB9 3B04 0138 7413 AB7D BACA 2955 13C9 FCE6 1927

To claim this, I am signing this object:

@hamtie
hamtie / maui_half_marathon.csv
Created April 3, 2014 06:07
Maui Marathon Analytics 2013
1 Reid Hunter Lahaina HI 2126 Half Marathon 22 M M 20-24 1:14:40 5:42/M
2 Tsukasa Kawarai Tokyo JAPAN 5132 Half Marathon 26 M M 25-29 *** 1:14:45 5:42/M
3 Stephen Marthy Honolulu HI 2165 Half Marathon 25 M M 25-29 *** 1:14:54 5:43/M
4 Dawn Grunnagle 2463 Half Marathon 36 F F 35-39 *** 1:17:58 5:57/M
5 Polina Babkina Honolulu HI 2296 Half Marathon 25 F F 25-29 *** 1:18:49 6:01/M
6 Nathan Carlson Honolulu USA 2979 Half Marathon 31 M M 30-34 1 1:18:49 6:01/M
7 Yusuke Sasaki Tokushima JAPAN 5107 Half Marathon 21 M M 20-24 1 1:18:52 6:01/M
8 Lindsay Allen Seattle WA 3096 Half Marathon 27 F F 25-29 *** 1:19:07 6:02/M
9 Jayson Fultz San Diego CA 2435 Half Marathon 41 M M 40-44 1 1:19:53 6:06/M
10 Reuben Njau Mccordsville IN 2666 Half Marathon 46 M M 45-49 1 1:22:05 6:16/M
@hamtie
hamtie / test.html
Created October 23, 2013 01:02
grunt-cdn broken on minified files
<div class="container"><a href="/" class="navbar-brand"><img src="/images/logo-mobile.png" class="navbar-logo"/></a><div class="open-in-app"><img src="/images/mobile-open-in-app.png"/></div></div>
@hamtie
hamtie / angular-sc.js
Created February 4, 2013 23:14
angular-sc.js
angular.module('api.soundcloud', ['ngResource'])
.constant('CLIENT_KEY', '<MYCLIENTKEY>')
.constant('API_HOST', 'http://api.soundcloud.com')
.factory('Tracks',
['$resource', 'API_HOST', 'CLIENT_KEY',
function($resource, api, key){
return $resource(host+'/tracks/:track_id.json',
{client_id: key, callback: "JSON_CALLBACK", track_id: '@track_id'}, {
query: {method:'JSONP'}
})
@hamtie
hamtie / auto-refresh.html
Created September 26, 2012 02:32
Snippet of html for refreshing a page while testing.
<!-- TESTING CODE REMOVE REMOVE REMOVE-->
<div id="auto-refresh"></div>
<br />
<script>
function timedRefresh(t) {
setTimeout("location.reload(true);",t);
updateTime(t)
}
function updateTime(t) {
@hamtie
hamtie / create_index.sh
Created March 16, 2012 00:57
Dynamic lib export
#!/bin/bash
# This script will create an index.js file in the root of your project directory (assuming this script is in the bin dir).
# The index file will export all files in the lib dir, but makes the assumption that all files have a single "." in the name,
# e.g. main.js will get transformed into a string like "main: require('./lib/main')"
# helper fun
function rm_if_exists {
if [[ -f $1 || -h $1 ]]; then
@hamtie
hamtie / offending_item.xml
Created October 6, 2011 19:33
incorrect timestamp in washingtonpost feed
<item xmlns:atom=\"http://www.w3.org/2005/Atom\">\n\t\t\t
<title>
<![CDATA[In its libraries, Dublin’s literary reputation shines]]>
</title>\n\t\t\t
<description>
<![CDATA[\n
<p>We Dubliners take a lot of pride in our city’s
<a href=\"http://www.washingtonpost.com/wp-dyn/content/article/2009/04/17/AR2009041701361.html\">reputation as a literary capital
</a> (not least because it lends our loquaciousness a certain gravitas, as if every quip were something more exalted than mere banter). Walk into any genuine pub in town, and you’re bound to see that famous poster of Irish literary heroes on the wall. It’s not idle boastfulness: Dublin can claim four Nobel laureates — George Bernard Shaw, W.B. Yeats, Samuel Beckett and Seamus Heaney. Moreover, the names Oscar Wilde, Brendan Behan, Flann O’Brien and
<a href=\"http://www.washingtonpost.com/wp-dyn/content/article/2004/06/13/AR2005041501984.html\">of course James Joyce
@hamtie
hamtie / showline.sh
Created September 2, 2011 04:02
no more `cat | grep` nonsense and escaping strings
#!/bin/bash
function showline {
file=$1
shift
cat $file | grep "$*"
}
@hamtie
hamtie / gist:1140990
Created August 11, 2011 22:41
Node Stack Trace
ReferenceError: GEL is not defined
at Object._onTimeout (http://www.freep.com/article/20110809/ENT04/110809051/1001/news:undefined:undefined<script>:2:25)
at Timer.callback (timers.js:83:39)
@hamtie
hamtie / git_update_subdirs.sh
Created July 19, 2011 21:54
One liner script to run "git pull" on all the subdirectories in a directory.
#!/bin/bash
ls -l | egrep '^d' | awk -v h=$(dirname $(readlink -f $0))/ '{ print "cd "h $8 "\ngit pull"}' | bash