Skip to content

Instantly share code, notes, and snippets.

03-Jun-2014 17:02:21 Jekyll output:
03-Jun-2014 17:02:21 Configuration file: _config-live.yml
03-Jun-2014 17:02:21 Source: /home/bamboo/bamboo-agent-home/xml-data/build-dir/CAMPAIGNDIGITAL-CANDDI-GRUNT
03-Jun-2014 17:02:21 Destination: /home/bamboo/bamboo-agent-home/xml-data/build-dir/CAMPAIGNDIGITAL-CANDDI-GRUNT/_site
03-Jun-2014 17:02:21 Generating...
03-Jun-2014 17:02:21 jekyll 2.0.3 | Error: No such file or directory - /home/bamboo/bamboo-agent-home/xml-data/build-dir/CAMPAIGNDIGITAL-CANDDI-GRUNT/_site/sitemap.xml
03-Jun-2014 17:02:21 Warning: Command failed:  Use --force to continue.
03-Jun-20
@coldclimate
coldclimate / gist:11288076
Last active August 29, 2015 14:00
This time last week
var last_week = new Date();
last_week.setDate(last_week.getDate() -7);
@coldclimate
coldclimate / gist:9994931
Created April 5, 2014 17:22
Grab your last.fm all time stats and see what you've contributed to the world listening stats.
import lastfm
api_key = 'REPLACEME'
api = lastfm.Api(api_key)
user = api.get_user('REPLACEME')
tracks = user.top_tracks
for track in tracks:
gcount = api.get_track(artist=track.artist.name,track=track.name).stats.playcount
print "%s %s %s of %s (%f )" % (track.artist.name,track.name, track.stats.playcount, gcount, track.stats.playcount/gcount)
{
"BrowserGUID" : "aa558a9bdba8b2558260e168bd79f3ff",
"ContactId" : "961f9d23c127472507b8441b25e1025f",
"Duration" : 0,
"GoalNo" : 2,
"GoalTitle" : "Form submission",
"GoalType" : "form",
"PageTypeId" : 3,
"ProcessedPPA" : [
"ProcessActions_FieldToCompany_Post_input_2",
@coldclimate
coldclimate / gist:8831241
Created February 5, 2014 19:28
How I got hubot running and talking to hipchat on Ubuntu 13
sudo apt-get update
sudo apt-get install nodejs npm
sudo apt-get install build-essential libssl-dev git-core redis-server libexpat1-dev
npm install -g coffee-script
sudo npm install -g coffee-script
sudo npm install -g hubot coffee-script
sudo mkdir myrobot
sudo chown ubuntu:ubuntu myrobot
hubot --create myrobot
cd myrobot/
@coldclimate
coldclimate / gist:7170213
Created October 26, 2013 14:45
Convert a list into a set in redis
redis-cli lrange 2013_10_26 0 2000 | xargs redis-cli sadd s2013_10_26
@coldclimate
coldclimate / gist:6163245
Created August 6, 2013 09:53
Find all errors, log out the time the happened, then hillbilly histogram them
grep -n "Connection refused" error.log-20130806 | awk '{print $2}' > errortimes.log
sort errortimes.log | uniq -c
// Don't forget this line or signal handling won't work:
declare(ticks = 1);
// This global flag is used to trigger a configuration file reload.
$load_config = true;
// The SIGHUP handler doesn't do any actual work; it just sets the flag.
function handle_hup($signal) {
global $load_config;
$load_config = true;
@coldclimate
coldclimate / gist:5974697
Created July 11, 2013 11:35
When developing scripts which are going to be run by cloud-init
The scripts you pass through as a compiled user-script are split up and expanded into /var/lib/cloud/instance/scripts so you can go and run them again and debug
@coldclimate
coldclimate / gist:5968918
Created July 10, 2013 18:38
Cheese scale. 1 (rubbish) to 10 (perfect)
1 Cheez Whiz
2 Dairylea
3 French Brie
4 Edam
5 Mild Cheddar
6 Smoked Applewood
7 Summerset Brie
8 Mature Cheddar
9 St James
10 Stilton