Skip to content

Instantly share code, notes, and snippets.

@tswicegood
tswicegood / gist:873838
Created March 17, 2011 04:26
The outline of a blog post describing the dream-classes that I'd want for a masters in Hack/Hacking.

How to think like a hacker.

Still think jailbreaking should be spelled with two words and involve police chases? Hackers have a different perspective on the world. Not what does this gadget do, but what can I make it do. This course introduces you to that mentality so you can start thinking like hacker.

A hacks guide to programming in Python

@hugs
hugs / selenium-examples.py
Created February 16, 2011 19:40
Example code for using the Selenium 2 Python bindings.
# To install the Python client library:
# pip install -U selenium
# Import the Selenium 2 namespace (aka "webdriver")
from selenium import webdriver
# iPhone
driver = webdriver.Remote(browser_name="iphone", command_executor='http://172.24.101.36:3001/hub')
# Android
require 'rubygems'
require 'twitter'
tweets = Twitter.user_timeline("andymboyle").collect {|r| r['text'] }.reverse
tweets = tweets.collect {|r| r.gsub(/(^|\s+)(?:I|me)([[:punct:]]|\s+|$)/i,'\1you\2') }
tweets = tweets.collect {|r| r.gsub(/(^|\s+)my([[:punct:]]|\s+|$)/i,'\1your\2') }
tweets = tweets.collect {|r| r.gsub(/(^|\s+)mine([[:punct:]]|\s+|$)/i,'\1yours\2') }
tweets = tweets.collect {|r| r.gsub(/(^|\s+)am([[:punct:]]|\s+|$)/i,'\1are\2') }
tweets = tweets.collect {|r| r.gsub(/(^|\s+)we'll([[:punct:]]|\s+|$)/i,'\1you\'ll\2') }
tweets = tweets.collect {|r| r.gsub(/(^|\s+)I'd([[:punct:]]|\s+|$)/i,'\1you\'d\2') }
anonymous
anonymous / gist:661291
Created November 3, 2010 16:19
Name: Janis Krums (IMAGE: http://a3.twimg.com/profile_images/1145596615/P1190085_2_2.JPG)
Twitter Handle: <a href="http://www.twitter.com/jkrums>@jkrums</a>
Sites: <a href="http://www.about.me/JanisKrums">http://www.about.me/JanisKrums</a>
Twitter bio: Entrepreneur, Athlete, The Miracle on the Hudson Photo Guy, Latvian, Co-Founder of Elementz Nutrition and InboxAlarm, Investor in AIT Bridges
Nominated by: Ellyn Angelotti
Text of Nomination: "The <a href="http://twitter.com/#!/jkrums/status/1121915133">photo</a> Janis took of the plane that landed in the Hudson River was not only a powerful image, but it also represents the changing nature of news as a result of social media." -- <a href="http://www.facebook.com/notes.php?id=122407694453913&notes_tab=app_2347471856#!/note.php?note_id=422518584332&comments">Ellyn Angelotti</a>
(Thursday)
Name: Monica Guzman (IMAGE: http://a1.twimg.com/profile_images/934435989/twittermonica.jpg)
Twitter Handle: <a href="http://www.twitter.com/moniguzman>@moniguzman</a>