Skip to content

Instantly share code, notes, and snippets.

View benatkin's full-sized avatar

Benjamin Atkin benatkin

View GitHub Profile
import oauth2.clients.imap as imaplib
import email
class Mailbox(object):
def __init__(self, conn):
self.conn = conn
self.total = self.conn.select('INBOX')[1][0]
self.current = 1
if ($.inArray('something_strange', neighbourhood) != -1) {
ghostbusters.call();
}

Testing out this gist stuff =p


I love gists.

@benatkin
benatkin / a.txt
Created November 7, 2010 16:27 — forked from ahoward/a.txt
42
@benatkin
benatkin / webapp.rb
Created November 16, 2010 03:40 — forked from igrigorik/webapp.rb
require 'rubygems'
require 'rack'
class Object
def webapp
class << self
define_method :call do |env|
func, *attrs = env['REQUEST_PATH'].split('/').reject(&:empty?)
[200, {}, send(func, *attrs)]
end
@benatkin
benatkin / index.html
Created July 18, 2011 18:16 — forked from jimjeffers/newSauce.js
Refactored the API for sauce.
<html>
<head></head>
<body>
<div id="container">
<header>
<h1 id="sauce">Sauce.js</h1>
<h2 id="tagline">Add some flavor to the web!</h2>
</header>
</div>
<script type="text/javascript" src="http://raw.github.com/jimjeffers/Sauce/master/src/easie.js"></script>
ARCHFLAGS='-arch i386 -arch x86_64'
rvm install 1.8.7 --debug --reconfigure -C --enable-shared=yes
wget http://sourceforge.net/projects/rubycocoa/files/RubyCocoa/1.0.0/RubyCocoa-1.0.0.tar.gz/download
tar xzf RubyCocoa-1.0.0.tar.gz && rm RubyCocoa-1.0.0.tar.gz && cd RubyCocoa-1.0.0
ruby install.rb config --build-universal=yes
ruby install.rb setup
sudo ruby install.rb install
@benatkin
benatkin / gist:1163665
Created August 22, 2011 21:35 — forked from voodootikigod/gist:1155790
PyCodeConf Ticket Give-away
Day job: Freelance Web Developer
Favorite Python project: Haystack
Favorite Conference: Ruby Hoedown
Python Experience Level: Intermediate
@benatkin
benatkin / quiz-1.md
Created October 3, 2012 04:42 — forked from ahoward/quiz-1.md
quiz-1.md
So you think you wanna be a web developer...

Fork this, update your copy with answers.

They don't need to be precise - pseudo-code is fine in most cases.

Some questions don't have correct answers.

@benatkin
benatkin / gist:4151386
Created November 26, 2012 23:38
Bootstrap styling for jQuery UI autocomplete
.ui-autocomplete {
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
float: left;
display: none;
min-width: 160px;
_width: 160px;
padding: 4px 0;