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
git log --pretty=oneline --abbrev-commit --decorate B..A |
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
diff -u <(git rev-list --first-parent FEATURE) \ | |
<(git rev-list --first-parent master) | \ | |
sed -ne 's/^ //p' | head -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
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 |
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
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 |
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
// 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; |
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
grep -n "Connection refused" error.log-20130806 | awk '{print $2}' > errortimes.log | |
sort errortimes.log | uniq -c |
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
redis-cli lrange 2013_10_26 0 2000 | xargs redis-cli sadd s2013_10_26 |
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
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/ |
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
{ | |
"BrowserGUID" : "aa558a9bdba8b2558260e168bd79f3ff", | |
"ContactId" : "961f9d23c127472507b8441b25e1025f", | |
"Duration" : 0, | |
"GoalNo" : 2, | |
"GoalTitle" : "Form submission", | |
"GoalType" : "form", | |
"PageTypeId" : 3, | |
"ProcessedPPA" : [ | |
"ProcessActions_FieldToCompany_Post_input_2", |
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
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) |