Skip to content

Instantly share code, notes, and snippets.

View straup's full-sized avatar

Aaron Straup Cope straup

View GitHub Profile
// See also: http://www.aaronland.info/weblog/2014/09/22/desire/#upload
function upload_init(){
$("#upload-form").submit(function(){
try {
var photos = $("#photo");
var files = photos = photos[0].files;
#!/usr/bin/env python
# see also:
# https://www.twilio.com/
# https://www.heroku.com/
# https://devcenter.heroku.com/articles/getting-started-with-python#declare-process-types-with-procfile
# https://devcenter.heroku.com/articles/config-vars
# https://devcenter.heroku.com/articles/logging#log-retrieval
import sys
@straup
straup / seven-years-of-links-take-two
Created December 24, 2012 22:17
7 years of links (from aaronland.info) take two...
@straup
straup / upload-note-by-email.pl
Created October 29, 2012 13:01
Upload by email handler to send notes to pinboard.in
#!/usr/bin/env perl
# For example:
# $> cat test.eml | perl upload-note-by-email.pl -c pinboard.cfg
use strict;
use Getopt::Std;
# All I can tell you is these are all available by
# default on pair.com so it's not really that big a
@straup
straup / add_pinboard_note.pl
Created October 28, 2012 12:33
Use WWW::Mechanize to post notes to pinboard.in
#!/usr/bin/env perl
use strict;
use WWW::Mechanize;
{
&main();
exit;
}
@straup
straup / factual_local_mappings.json
Created August 17, 2012 15:40 — forked from twbell/factual_local_mappings.json
Provides a machine-readable mapping between Factual's Global Local Schema and country-specific attributes, denotes which attributes are supported within a specific country, and provides a country-to-table lookup
{
"countries": {
"ar": {
"country": "Argentina",
"table": "PfldJg",
"attributes": {
"factual_id": {
"supported": true,
"mapping": "Factual ID"
},
@straup
straup / flinstagram
Created February 27, 2012 18:40
This is a dumb sample script / reference implementation to fetch all the instagram photos belonging to a user and then upload them to their flickr account.
<?php
# flinstagram
# THIS IS PROOF-OF-CONCEPT CODE
# ALL THE USUAL CAVEATS APPLY.
# NO. REALLY.
# This is a dumb sample script to fetch all the instagram photos
# belonging to a user and then upload them to their flickr account.