Actual hashes have been modified to protect the innocent
- provider: https://api.twitter.com/1/account/verify_credentials.json
- headers: OAuth
- oauth_timestamp="1318885877",
- oauth_nonce="BC898B80-069E-4C42-A2AD-6A6D3B52A070",
| default_run_options[:pty] = true | |
| set :application, "<your-application-folder-name>" | |
| set :domain, "<your-ip-addr>" | |
| set :user, "<your-deploy-user>" | |
| set :group, "<your-deploy-group>" | |
| set :runner, "<your-deploy-user>" | |
| set :use_sudo, true | |
| set :scm, :git | |
| set :deploy_via, :remote_cache | |
| set :repository, "git@github.com:your-account/your-repo.git" |
| <div id="google_chart" style="width:100%;height:350px;"></div> | |
| <script type="text/javascript" src="https://www.google.com/jsapi"></script> | |
| <script type="text/javascript"> | |
| (function(){ | |
| var drawChart = function(){ | |
| var data = {"dataSourceUrl":"//docs.google.com/a/sunlightfoundation.com/spreadsheet/tq?key=0Av12a-o2y1_WdEdGNVl0ZTFOQklqR3NNYzRWSk9kcEE&transpose=0&headers=0&range=A1%3AB56&gid=0&pub=1","options":{"displayAnnotations":true,"vAxes":[{"useFormatFromData":true,"title":"Left vertical axis title","minValue":null,"viewWindowMode":"pretty","viewWindow":{"min":null,"max":null},"maxValue":null},{"useFormatFromData":true,"minValue":null,"viewWindowMode":"pretty","viewWindow":{"min":null,"max":null},"maxValue":null}],"titleTextStyle":{"fontSize":16},"booleanRole":"certainty","title":"Chart title","wmode":"opaque","hAxis":{"useFormatFromData":true,"title":"Horizontal axis title","minValue":null,"viewWindowMode":"pretty","viewWindow":{"min":null,"max":null},"maxValue":null},"width":600,"height":371},"state": |
| import unicodedata | |
| unicodedata.normalize('NFKD', u'Menéndez').encode('ascii', 'ignore') | |
| #>'Menendez' |
| #!/usr/bin/env ruby | |
| ### make sure you `brew install chromedriver` and `gem install selenium-webdriver` before running this! | |
| require 'rubygems' | |
| require 'selenium-webdriver' | |
| # maximize this mofo | |
| profile = Selenium::WebDriver::Chrome::Profile.new | |
| profile['browser.window_placement.top'] = 0 | |
| profile['browser.window_placement.left'] = 0 |
| #!/usr/bin/env python | |
| from __future__ import division | |
| from curses.ascii import isdigit | |
| import json | |
| import sys | |
| import datetime | |
| # import re | |
| from django.utils.datastructures import SortedDict | |
| from django.contrib.localflavor.us.us_states import STATE_CHOICES |
| # Define any global settings here | |
| FOO = 'bar' | |
| # Import local settings or from os.environ | |
| try: | |
| from myapp.local_settings import * | |
| except ImportError: | |
| import imp | |
| import os | |
| import sys |
| (function($){ | |
| $.fn.scrollalax = function(opts){ | |
| var el = $(this) | |
| , options = {} | |
| , defaults ={ | |
| 'speed': 80 | |
| } | |
| , scroller | |
| , init = function(){ | |
| options = $.extend(options, defaults, opts); |
| from nltk import regexp_tokenize | |
| regex1 = r'''(?x) | |
| (?:H|S)\. ?(?:(?:J|R)\. )?(?:Con\. )?(?:Res\. )?\d+ # Bills | |
| | ([A-Z]\.)+ # Abbreviations (U.S.A., etc.) | |
| | ([A-Z]+\&[A-Z]+) # Internal ampersands (AT&T, etc.) | |
| | (Mr\.|Dr\.|Mrs\.|Ms\.) # Mr., Mrs., etc. | |
| | \d*\.\d+ # Numbers with decimal points. | |
| | \d\d?:\d\d # Times. | |
| | \$?[,0-9]+ # Numbers with thousands separators. |
| /** | |
| * jQuery.deparam | |
| * reverses jQuery's param() method, converting a querystring back to an object | |
| */ | |
| (function($){ | |
| $.deparam = function(qs) { | |
| var params, pieces; | |
| params = {}; | |
| if (!qs) { | |
| return params; |
Actual hashes have been modified to protect the innocent