Skip to content

Instantly share code, notes, and snippets.

:⌉
=⌉
¦-) as opposed to |
⍥ om nom nom
@inky
inky / I hate computers.
Created May 24, 2010 10:59
Thinking of taking up coffee.
$ gem install spree
ERROR: Error installing spree:
actionpack requires rack (~> 1.0.0, runtime)
$ gem install rack
Successfully installed rack-1.1.0
1 gem installed
$ gem install spree
ERROR: Error installing spree:
import time
class Retry(object):
default_exceptions = (Exception)
def __init__(self, tries, exceptions=None, delay=0):
"""
Decorator for retrying function if exception occurs
tries -- num tries
exceptions -- exceptions to catch
@mwunsch
mwunsch / html5.vim
Created August 12, 2010 20:58 — forked from rcmachado/html5.vim
" Vim syntax file
" Language: HTML (version 5)
" Maintainer: Rodrigo Machado <rcmachado@gmail.com>
" URL: http://gist.github.com/256840
" Last Change: 2009 May 13
" License: Public domain
" (but let me know if you liked it :) )
"
" Note: This file just adds the new tags from HTML 5
" and don't replace default html.vim syntax file
# -*- coding: utf-8 -*-
from functools import wraps
import time
def retry(tries, exceptions=None, delay=0):
"""
Decorator for retrying a function if exception occurs
tries -- num tries
exceptions -- exceptions to catch
@mwunsch
mwunsch / gist:730757
Created December 6, 2010 19:12
I would have posted this to Tumblr but it is down right now.

Tumblr has had a history of problematic downtime, but none as excruciating as this most recent debacle.

A couple of notes:

  1. Tumblr is horribly opaque in regards to its system status. Some transparency would be nice. Look to status.github.com for inspiration.

  2. I think it is safe to say that a lot of folks and businesses now consider Tumblr a mission critical piece of infrastructure.

  3. I am not a customer of Tumblr, I am just a user. I'm not paying for my Tumblr account; nobody is. At this point in Tumblr's operation, I get the sense that the only true customers will be advertisers of some kind in the near future. I'd like to pay for my Tumblr account. At least then Tumblr would have somebody to answer to.

@Kilian
Kilian / annoying.js
Created January 6, 2011 15:04
How to be an asshole
/**
* Annoying.js - How to be an asshole to your users
*
* DO NOT EVER, EVER USE THIS.
*
* Copyright (c) 2011 Kilian Valkhof (kilianvalkhof.com)
* Visit https://gist.github.com/767982 for more information and changelogs.
* Visit http://kilianvalkhof.com/2011/javascript/annoying-js-how-to-be-an-asshole/ for the introduction and weblog
* Check out https://gist.github.com/942745 if you want to annoy developer instead of visitors
*
@epochblue
epochblue / lookbusy.py
Created April 19, 2011 18:52
Just tell 'em you're seeding the search index...
#!/usr/bin/env python -tt
import time
import random
OMGBUSY = """
>> execute: Splitting up dataset, running from {0} to {1}
>> routingPattern Connect route "taggable_add_tag" (/admin/addTag/:object_class/:object_id)
>> routingPattern Connect route "taggable_remove_tag" (/admin/removeTag/:object_class/:object_id)
>> routingPattern Connect route "prestaSitemap_index" (/sitemap.xml)
@140bytes
140bytes / LICENSE.txt
Created May 9, 2011 16:13
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@ckolderup
ckolderup / gist:963816
Created May 10, 2011 02:22
woman loads manpages from man.cx in w3m
#woman loads manpages from man.cx in w3m, since you sometimes don't get them via homebrew (for good reason: http://goo.gl/zvwvp)
#use `woman w3m` to view the manpage for w3m.
#use `woman 2 wait` to view the page for "wait" from section 2 if you really need this for some reason, I dunno, whatevs
brew install w3m; echo "woman() { if [ \$# -eq 2 ]; then w3m \"http://man.cx/\$2(\$1)\"; else w3m \"http://man.cx/\$1\"; fi; }" >> ~/.bashrc; source ~/.bashrc