This file contains hidden or 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/perl | |
use strict; | |
use warnings; | |
no warnings 'redefine'; | |
use XML::Atom::Client; | |
use XML::XPath; | |
my $username = 'email-address-here'; |
This file contains hidden or 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/perl | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
use DBI; | |
use Flickr::API; | |
use XML::LibXML; |
This file contains hidden or 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
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: |
This file contains hidden or 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
# 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" & |
This file contains hidden or 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/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 |
This file contains hidden or 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/python | |
# Incredibly cackhanded Twitter backup. Needs *lots* of work. | |
import urllib2 | |
import simplejson as json | |
import base64 | |
page = 1 |
This file contains hidden or 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
<<<<<<< Updated upstream | |
#!/usr/bin/python | |
import flickrapi # http://stuvel.eu/projects/flickrapi | |
import json as simplejson | |
import urllib2 | |
api_key = '' | |
api_secret = '' | |
photoset_id = '' |
This file contains hidden or 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
""" | |
Convert numbers from base 10 integers to base X strings and back again. | |
Sample usage: | |
>>> base20 = BaseConverter('0123456789abcdefghij') | |
>>> base20.from_decimal(1234) | |
'31e' | |
>>> base20.from_decimal('31e') | |
1234 |
This file contains hidden or 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/python | |
import simplejson as json | |
import sys | |
import urllib2 | |
# what site? | |
top_level_url = "http://twitter.com/" | |
username = "blech" | |
password = "notmyrealpassword" |
This file contains hidden or 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/python | |
import flickrapi | |
import simplejson | |
keys = { | |
'flickr_key': " ", # put your key and secret here. I'm not giving you mine. | |
'flickr_sec': " ", | |
} |
OlderNewer