davehansen’s posterous

MySQLdb User's Guide

http://mysql-python.sourceforge.net/MySQLdb.html

Loading mentions Retweet

Comments [0]

Lec 1 | MIT 6.00 Introduction to Computer Science and Programming, Fall 2008

Loading mentions Retweet

Comments [0]

Convert files to JPEG w/ Python/PIL

Convert files to JPEG

 import os, sys
import Image

 for infile in sys.argv[1:]:
  f, e = os.path.splitext(infile)
  outfile = f + ".jpg"
  if infile != outfile:
  try:
  Image.open(infile).save(outfile)
  except IOError:
  print "cannot convert", infile

Loading mentions Retweet

Comments [0]

Zenburn for putty

Default Foreground: 255/255/255
Default Background: 51/51/51
ANSI Black: 77/77/77
ANSI Green: 152/251/152
ANSI Yellow: 240/230/140
ANSI Blue: 205/133/63
ANSI Blue Bold 135/206/235
ANSI Magenta: 205/92/92
ANSI Cyan: 255/160/160
ANSI Cyan Bold: 255/215/0
ANSI White: 245/222/179

Loading mentions Retweet

Comments [0]

ImageMagick hax

convert -background white -transparent white -pointsize 32 -size 200x
caption:'Journal of Human Consumption and Cannibalism Studies' +repage
text.gif
composite -gravity center text.gif blank.gif blank-text.gif

Loading mentions Retweet

Comments [0]

Learning to handle cookies with python scraper

cookielib_example.py: uses cookielib and various other methods for foolproof cookie handling and storage
scaper.py: uses pycurl/libcurl to access resources with 'automatic cookie handling'

Click here to download:
cookielib_example.py (4 KB)

Click here to download:
scraper.py (1 KB)

Loading mentions Retweet

Comments [0]

Cory Doctorow interview on librarianship and media

Loading mentions Retweet
Filed under  //   cory doctorow   librarians   libraries   library school   vid  

Comments [0]

App to AutoFilter Google Docs spreadsheets

http://spreadsheetautofilter.googlepages.com/index.html

Loading mentions Retweet

Comments [0]

Git troubleshooting

When Git tells you it failed to push some refs (link)

I received an unhelpful error while trying to push to a repository on Github today:

 git push
To git@github.com:user/repo.git
! [rejected] branchname -> branchname (non-fast forward)
error: failed to push some refs to 'git@github.com:user/repo.git'

In case you ever have the same problem, all you have to do is a quick git pull first, then you can carry on as normal. Easy when you know how...

github and public key (link)

 $ git push origin master Permission denied (publickey). fatal: The remote end hung up unexpectedly error: failed to push to 'git@github.com:stonean/stage.git' 

I knew it was a configuration issue, just wasn’t sure if it was a git thing or not. After a minute or two of thinking it through, all I needed to do was:

 $ cd ~/.ssh $ ssh-add id_rsa

I then re-tried the push command, and it worked. Cool.

UPDATE: Can just do ssh-add without being in the .ssh directory

Loading mentions Retweet
Filed under  //   git   ssh   ssh-add  

Comments [0]

August 15, 2009

Getting Wii Sports Resort working

from description of this video:

 Config Options -> Alt .Dol -> CD

 When booting, press right arrow to choose player.dol

Loading mentions Retweet
Filed under  //   wii   wii sports resort  

Comments [0]