- I did this as root:
$ sudo su
, although it may not be necessary. - Download AWS command line tools:
$ curl https://raw.github.com/timkay/aws/master/aws -o aws
- Install:
- Automatically:
$ perl --install aws
- Manually:
$ mv aws /usr/local/bin/ && chmod +x /usr/local/bin/aws
- Automatically:
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
/* | |
* Scan your official Twitter archive to get a basic count of the | |
* people you've talked to and the words that you've used. | |
* | |
* $ node tweet-counts.js ~/path/to/tweets-archive/ | |
* | |
*/ | |
var fs = require('fs'); | |
var base = process.argv[2].replace(/\/$/, ''); // Strip trailing slash. | |
var Grailbird = { data: {} }; // The Twitter archive uses this. |
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
web: node index.js |
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 node | |
/** | |
* Generate CSS3 transform animation that traces a circle. | |
* | |
* $ node tracecircle.js animationName vendorPrefix percentStep radiusPixels | |
* | |
* For example: | |
* | |
* $ node tracecircle.js floating -webkit- 10 20 |
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
<!DOCTYPE HTML> | |
<HTML> | |
<HEAD> | |
<TITLE>Hello World</TITLE> | |
</HEAD> | |
<BODY> | |
</BODY> | |
</HTML> |
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
javascript:(function() {if(typeof jQuery=='undefined'){var j=document.createElement('script');j.type='text/javascript';j.onload=papyrus;j.src='http://is.gd/uDgzgG';document.body.appendChild(j);}else{papyrus();}function papyrus(){$('*').css({'font-family':'Papyrus'});}})(); |
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
var csv = require('csv'); | |
var pg = require('pg'); | |
var connectionString = 'postgres://tylor@localhost/drivebc'; | |
var client = new pg.Client(connectionString); | |
client.connect(); | |
client.query("DROP TABLE incidents"); | |
client.query("CREATE TABLE incidents(import_id serial primary key, \"id\" varchar(255), cause varchar(255), district varchar(255), state varchar(255), severity varchar(255), localupdatetime varchar(255), advisorymessage text, isbidirectional varchar(255), trafficpattern varchar(255), head_latitude varchar(255), head_longitude varchar(255), tail_latitude varchar(255), tail_longitude varchar(255), route varchar(255), type varchar(16))"); |
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
Some basic queries of the DriveBC incident data 2006-2011. | |
Total incidents: 817479 | |
Number of incidents by region: | |
Rocky Mountain District 149174 | |
West Kootenay District 133435 | |
Thompson Nicola District 101701 | |
Cariboo District 92216 |
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
/* | |
* Simply code to rate limit your stdout. | |
* | |
* Compile: | |
* - $ gcc limit.c | |
* Fun uses: | |
* - $ find ~/Sites/thisisourstop/ -name "*.js" -exec cat {} \; | ./a.out 1000 | |
* - $ ./a.out < /dev/random | |
*/ | |
#include <stdio.h> |
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
In a week of broadcast HOT 97 played 1165 tracks, which breaks down to 86 unique songs. | |
The top 10 songs make up 55% of plays and the top 20 songs make up nearly 74% of plays. | |
86 "MERCY" - KANYE WEST FT BIG SEAN, PUSTA T & 2CHAINZ | |
86 "LEMME SEE" - USHER FEAT. RICK ROSS | |
80 "THE MOTTO" - DRAKE | |
78 "UP REMIX" - LOVERANCE FT 50 CENT, YOUNG JEEZY & T.I. | |
72 "COLD (SHORT)" - KANYE WEST FT DJ KHALED | |
56 "HANDS ON THE WHEEL" - SCHOOL BOY Q FT ASAP ROCKY | |
47 "LEAVE YOU ALONE" - YOUNG JEEZY |