Skip to content

Instantly share code, notes, and snippets.

View mtwstudios's full-sized avatar

Matthew Tom-Wolverton mtwstudios

View GitHub Profile
Doculator for splash script
Stances of which is link
I, a bit, do not buffers.
Impressed jQuery on.
This mor beautiful
HTML colooked shell
Quite.back(). Th' page
Her big ball of the experiment,
@unixmonkey
unixmonkey / flying_spaghetti_monster.rb
Last active September 3, 2020 12:37
Example Rails model with all the bells and whistles
# == Schema Information
#
# Table name: flying_spaghetti_monsters
#
# id :integer(4) not null, primary key
# awesomeness :string
# meatballs :boolean
# last_seen :datetime
# model-specific requires
#!/usr/bin/env ruby
# == Synopsis
# jsonpretty: a quick script for making JSON output legible
#
# == Usage
# jsonpretty [a JSON encoded file]
# [some stream with JSON text] | jsonpretty
#
# For this help use: jsonpretty -h
@fcalderan
fcalderan / inception-javascript.js
Created November 2, 2010 09:42
inception explained as a 4 nested javascript closures
/*
* Fabrizio Calderan, twitter @fcalderan, 2010.11.02
* I had an idea: could Inception movie be explained by a few javascript closures
* and variable resolution scope (just for fun)?
*
* Activate javascript console =)
*/
<script>
console.group("inception movie");
@jasonroelofs
jasonroelofs / setup-statsd.sh
Created April 27, 2011 18:25 — forked from collegeman/setup-statsd.sh
Turn an Ubuntu 10.10 EC2 into a StatsD/Graphite server
# install git
sudo apt-get install g++ curl libssl-dev apache2-utils
sudo apt-get install git-core
# download the Node source, compile and install it
git clone https://github.com/joyent/node.git
cd node
./configure
make
sudo make install
# install the Node package manager for later use
@kristi
kristi / missing.py
Created September 1, 2011 16:07
find missing natcomm facebook members
#!/usr/bin/env python
import codecs
import json
import urllib2
tcomm_id = '105089836262253'
natcomm_id = '134083046643371'
# Get token from
# https://developers.facebook.com/tools/explorer
# or create a fb app (https://developers.facebook.com/apps)
@codingjester
codingjester / xauth.py
Created October 19, 2011 15:59
Using XAuth for Tumblr
#!/usr/bin/env python
import urllib
import urlparse
import oauth2 as oauth
@pheuter
pheuter / sc-dl.js
Created March 5, 2012 20:44
Bookmarklet that generates download link for a Soundcloud upload
(function(d) {
var dl = d.createElement('a');
dl.innerText = 'Download MP3';
dl.href = "http://media.soundcloud.com/stream/"+d.querySelector('#main-content-inner img[class=waveform]').src.match(/\.com\/(.+)\_/)[1];
dl.download = d.querySelector('em').innerText+".mp3";
d.querySelector('.primary').appendChild(dl);
dl.style.marginLeft = '10px';
dl.style.color = 'red';
dl.style.fontWeight = 700;
})(document);
@codingjester
codingjester / xauth_request.py
Last active May 14, 2020 23:40
Python xAuth Example
#!/usr/bin/env python
import urllib
import urlparse
import oauth2 as oauth
import json
consumer_key="consumer_key"
consumer_secret="consumer_secret"
access_token_url = 'https://www.tumblr.com/oauth/access_token'
@codingjester
codingjester / three_legged_oauth.py
Last active December 9, 2018 02:34
Tumblr 3 Legged OAuth using Python lib OAuth2
import urlparse
import oauth2 as oauth
consumer_key = 'consumer_key'
consumer_secret = 'consumer_secret'
request_token_url = 'https://www.tumblr.com/oauth/request_token'
access_token_url = 'https://www.tumblr.com/oauth/access_token'
authorize_url = 'https://www.tumblr.com/oauth/authorize'