Skip to content

Instantly share code, notes, and snippets.

View blech's full-sized avatar

Paul Mison blech

View GitHub Profile
@blech
blech / london-railway-subway.geojson
Last active August 29, 2015 13:56 — forked from anonymous/overpass.geojson
OSM's railway=subway for London, from Overpass
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@blech
blech / caltrain.geojson
Last active August 29, 2015 13:56 — forked from anonymous/overpass.geojson
Caltrain, from OSM via Overpass
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@blech
blech / README.md
Last active August 29, 2015 13:57
LEO vs geostationary

Geostationary (black), semi-synchronous (grey) and low earth (red) orbits compared.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@blech
blech / fetch-vox-post-xml.pl
Last active August 29, 2015 20:44
Fetch a Vox post as XML
#!/usr/bin/perl
use strict;
use warnings;
no warnings 'redefine';
use XML::Atom::Client;
use XML::XPath;
my $username = 'email-address-here';
@blech
blech / flickr-auth-example.pl
Last active August 29, 2015 20:45
Old Flickr auth example in Perl
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
use DBI;
use Flickr::API;
use XML::LibXML;
blech@hunter:~/bots/pastebot$ perl pastebot.perl
While loading library [Server::Web]
pastebot.perl Error while loading Server::Web: Can't locate object method "new" via package "POE::Session" at Util/Data.pm line 291.
Compilation failed in require at Server/Web.pm line 20.
BEGIN failed--compilation aborted at Server/Web.pm line 20.
Compilation failed in require at (eval 36) line 1.
BEGIN failed--compilation aborted at (eval 36) line 1.
Please make sure that the following libraries
have been installed:
@blech
blech / music-tunnel
Created February 13, 2009 13:41
SSH tunnel w/Rendezvous
# posted partly as an aide-memoire, but more usefully, as a prompt
# for me to make this into a proper stop-start daemon
# hopefully, one that won't have hardcoded machine names...
IPADDR=`ifconfig en0 | grep 'inet ' | awk '{print $2}' | sed 's/addr://'`
ssh house.husk.org -N -f -L *:3698:foil:3689
dns-sd -P "foil" _daap._tcp. local 3698 foil.local. $IPADDR txtvers=1 "Database ID=BC2C8AD5" "Machine ID=BC2C8AD5" &
@blech
blech / fetch_tumblr.py
Last active August 30, 2015 00:25
A hackish Tumblr backup tool
#!/usr/bin/python
# this script will fetch all your Tumblr posts into a single big JSON file
# TODO- authenticate (fetch private posts)
# TODO- fetch referenced media?
import urllib2
import simplejson as json
start = 0
@blech
blech / fetch_twitter.py
Last active August 30, 2015 00:25
See /blech/mytweets
#!/usr/bin/python
# Incredibly cackhanded Twitter backup. Needs *lots* of work.
import urllib2
import simplejson as json
import base64
page = 1