Skip to content

Instantly share code, notes, and snippets.

View blech's full-sized avatar

Paul Mison blech

View GitHub Profile
@blech
blech / blech-flickrtouchr.py
Created December 14, 2009 00:10
See /blech/hivelogic-flickrtouchr
#!/usr/bin/env python
#
# FlickrTouchr - a simple python script to grab all your photos from flickr,
# dump into a directory - organised into folders by set -
# along with any favourites you have saved.
#
# You can then sync the photos to an iPod touch.
#
# Version: 1.1
@blech
blech / galleries_by_contacts.py
Created January 10, 2010 17:04
Find Flickr galleries by contacts
#!/usr/bin/python
import feedparser
import flickrapi
import simplejson
import sys, codecs
sys.stdout = codecs.getwriter('utf-8')(sys.stdout)
keys = {
@blech
blech / debug
Created February 10, 2010 23:07 — forked from tominsam/debug
AppEngine timing debugger
import time
from google.appengine.ext import webapp
from google.appengine.api import datastore
import logging
ACCUMULATE = False
def monkey_patch(namespace, name, wrapper):
nname = '_orig_' + name
if not getattr(namespace, nname, None):
@blech
blech / twitter-everyone-list.py
Created March 17, 2010 22:03
Create an 'everyone' list on Twitter
#!/usr/bin/python
import warnings
warnings.simplefilter('ignore', DeprecationWarning)
import httplib2, urllib, time
from urllib import urlencode
try:
import json
except ImportError:
@blech
blech / get-phone-numbers.applescript
Created March 27, 2010 16:08
Get phone numbers from Address Book
tell application "Address Book"
repeat with p in every person
get name of p
get value of every phone of p
end repeat
end tell
@blech
blech / gist:376583
Created April 23, 2010 14:25
MBP 13" battery life
2010-04-23 09:47:18: Charger unplugged
2010-04-23 09:47:19: --- System waking up... (battery charge = 95%)
2010-04-23 12:36:05: --- System going to sleep... (battery charge = 48%)
2010-04-23 13:05:32: --- System waking up... (battery charge = 46%)
[Shutdown ~15:40:00 with 0% battery]
@blech
blech / 50ly.tsv
Last active September 24, 2015 05:37
Stars within 50 light years
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 10 columns, instead of 7. in line 1.
Catalog Name Equatorial Galactic Classification Visual Abs Prllx Dist Gliese Proper Name Notes
Coordinates Coordinates Mag Mag (ly) Number
RA Dec l° b°
Sun --- --- -- -- G2V -26.8 4.83 -- 0.00 -- Sol Has 8 planets
Alpha Centauri 14 39.6 -60 50 315.7 -0.7 G2V+K1V+M5.5V -0.29 4.06 742.12 4.39 Gl 559 Rigil Kentaurus
Alpha Canis Majoris 06 45.1 -16 42 227.2 -8.9 A1V+DA2 -1.46 1.43 379.21 8.60 Gl 244 Sirius
Epsilon Eridani 03 32.9 -09 27 195.8 -48.1 K2V 3.72 6.18 310.75 10.50 Gl 144 Has a planet
Alpha Canis Minoris 07 39.3 +05 13 213.7 +13.0 F5IV-V+DA 0.36 2.64 285.93 11.41 Gl 280 Procyon
61 Cygni 21 06.9 +38 44 82.3 -5.8 K5V+K7V 4.79 7.07 285.42 11.43 Gl 820
Epsilon Indi 22 03.4 -56 47 336.2 -48.0 K4V+T1+T6 4.69 6.89 275.76 11.83 Gl 845
@blech
blech / README.md
Last active September 24, 2015 10:38
iTunes defaults

These four defaults settings will disable Ping, hide the dropdown, restore the old arrows, and invert them such that clicking them will navigate the libary, not the Store. Boiled down from http://gidden.net/tom/2010/09/25/removing-ping

defaults write com.apple.iTunes disablePingSidebar 1
defaults write com.apple.iTunes hide-ping-dropdown 1
defaults write com.apple.iTunes show-store-link-arrows 1

defaults write com.apple.iTunes invertStoreLinks 1

@blech
blech / README.md
Last active September 24, 2015 12:18
Recreate Delicious network on Pinboard

This is a naive attempt to map Delicious users to those on Pinboard. It's probably not much use to anyone now but it did a good enough job for me, back when I wrote it.

@blech
blech / hideradar.css
Created June 8, 2011 16:47
hide Tumblr radar user style
#right_column .radar { display:none; !important }