Skip to content

Instantly share code, notes, and snippets.

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>
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') }
@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
@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

@netcarver
netcarver / sed_cleaner.txt
Created August 11, 2011 21:47
sed_cleaner -- with trigger guard.
# Name : sed_cleaner
# Version : 0.8.45
# Description : Does a little house cleaning on new installs.
# Author : Netcarver
# URL : https://github.com/netcarver/sed_cleaner
# Type : Admin only
# ......................................................................
# Revision : 08ad0b362fbe0908f8adaaaaf09f0863a76cbed5
# Branch : master
# ......................................................................
@mxcl
mxcl / uninstall_homebrew.sh
Created August 26, 2011 11:25
Uninstall Homebrew
#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e
// `Clearfix
//--------------------------------------------------
// Can be added to other style rules via:
//
// #foobar
// @extend .clearfix
.clearfix:before,
.clearfix:after
innerWidth / innerHeight tests @ http://sandbox.thewikies.com/orientation/
--------------------------------------------------------------------------------
Tested (14 devices, 28 browsers):
Droid 2 Global Android 2.2
iPhone 4 iOS5 (Safari, Opera Mini)
Motorola Atrix Android 2.3.4 (Stock browser, Dolphin, Skyfire, Opera Mini, Firefox)
Samsung Galaxy S9000 Android 2.3 (Webkit, Opera Mobile)
Samsung Galaxy Y Android 2.3.5
@nathansmith
nathansmith / percentage_grid.sass
Created December 30, 2011 19:24
Percentage Based "Grid"
// How I would approach a fluid grid:
//
// [1] Let the name reflect the % width,
// eliminating "1 of 12" guesswork.
//
// [2] Also, put 10px of padding to either
// side, to stack and make a 20px gutter.
//
// [3] Make the box-sizing = border-box, so that
// 50% + 20px total side padding = 50%, etc.
@Wilto
Wilto / demo.html
Created July 3, 2012 21:06
Hide and Tel
<!DOCTYPE html>
<!--[if lt IE 7 ]> <html lang="en" class="ie ie6"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="ie ie7"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="ie ie8"> <![endif]-->
<!--[if IE 9 ]> <html lang="en" class="ie ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">