👷♂️
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.snowplow = function() { console.log(arguments); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
for branch in `git branch -r | grep -v HEAD`;do | |
echo -e `git show --format="%Cred%ai,%Creset,%an,%Cgreen(%ar),%C(yellow)" $branch --date=short --date=relative | | |
head -n 1 ` $branch; done | sort -r | head -n 55 | column -ts',' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :import_data do | |
desc "Import Data" | |
task :client => :environment do | |
require 'csv' | |
mappings = { | |
'cliClientID' => 'old_client_id', | |
'cliClientFirstName' => 'first_name', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
BASE=`pwd` | |
PROJECT='xxxxx' | |
tmux start-server | |
# new-session creates first window named 'console' | |
tmux new-session -d -s $PROJECT -n console | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import json, sys, urllib2 | |
URL = "https://gist.githubusercontent.com/swmcc/6e3f79ac59511da7b123/raw/4a56499cd71b8ac810e5b78ae8d1a2a2733886e8/translinktimes.json" | |
json = json.load(urllib2.urlopen(URL)) | |
route = sys.argv[1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import urllib2 | |
import json | |
from collections import namedtuple | |
NESTORIA_API_URL = "http://api.nestoria.co.uk/api?country=uk&action=search_listings&place_name=glenavy&encoding=json&listing_type=buy&number_of_results='50'" | |
response = urllib2.urlopen(NESTORIA_API_URL) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import datetime, xmltv | |
from operator import itemgetter | |
from collections import namedtuple | |
filename = "tv.xml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# my todo thingie | |
alias tdm='todos | grep MIQ' # work | |
alias sdm='todos | grep SG' # startup | |
alias pdm='todos | grep swmcc' # personal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// attach GA click handler | |
// note: the GA code is stored in a 'data-ga' element | |
// instead of inserting onclicks directly into the markup. | |
// <a data-ga="Event, Action, Label" | |
// id="mode-switch-devices" | |
// class="ajax" | |
// title="" | |
// href=""></a> | |