Skip to content

Instantly share code, notes, and snippets.

@rickhull
rickhull / README.txt
Created November 28, 2010 19:18
Hacker News redux using CSS and semantic markup
index.html looks for custom.css, grayarrow.gif, and y18.gif locally in the same folder as index.html
index.html and custom.css are provided by this gist
get the images from:
http://ycombinator.com/images/grayarrow.gif
http://ycombinator.com/images/y18.gif
Current issues:
* getting the correct margin on the logo in the header
@th0ma5w
th0ma5w / horoscopescrape.py
Created January 12, 2011 14:38
Example of Generating URLs for downloading
"""
Creates a list of URLs to stdout based on repeating patterns found in the site, suitable for use with WGET or CURL.
"""
import datetime
scopes=[
"aries",
"taurus",
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.steveivy.updategithubwiki</string>
<key>LowPriorityIO</key>
<true/>
<key>ProgramArguments</key>
<array>
anonymous
anonymous / gist:819641
Created February 10, 2011 00:12
Python text2image
import sys
import optparse
def text2image(text,color):
import Image
import ImageDraw
lines = text.split('\n')
im = Image.new("RGBA",(1,1),color=None)
draw = ImageDraw.Draw(im)
#
@sente
sente / reddit.html
Created April 28, 2011 22:32
An example of a retrieving data from reddit's JSON(p) api using jquery
<!DOCTYPE html>
<!--
Stuart Powers
http://sente.cc/
http://twitter.com/stuartpowers
-->
<html>
<head>
@jraines
jraines / MacVim-Janus.md
Created May 1, 2011 20:03
Macvim & Janus

##Intro

Janus is a "basic distribution of vim plugins and tools intended to be run on top of the latest MacVIM snapshot." It is maintained by Yehuda Katz and Carl Lerche.

I recently whinged on Twitter that all I really want is vim with TextMate's Command-T go-to-file functionality and some efficient visual tab/buffer navigation. Turns out MacVim + Janus, with just a few tweaks, is all that and more.

Installing Janus

Follow the installation instructions on the git page

@bclinkinbeard
bclinkinbeard / release.sh
Created November 1, 2011 20:22
Bash script to automate the Git Flow tag/release process
#!/bin/bash
# current Git branch
branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')
# v1.0.0, v1.5.2, etc.
versionLabel=v$1
# establish branch and tag name variables
devBranch=develop
unless ARGV.size == 2
puts "USAGE: ruby draw_something.rb ACKRCKOOLCWZ 5"
exit 1
end
letters = ARGV[0].downcase.split(//).sort
length = ARGV[1].to_i
require 'open-uri'
uri = 'http://static.iminlikewithyou.com/drawsomething/wordlist.csv'
@JakeWharton
JakeWharton / ViewHoldingAdapter.java
Created April 26, 2012 06:54
Template for a list adapter which uses a view holder to cache lookups.
public class TweetAdapter extends BaseAdapter {
// ...
public View getView(int position, View convertView, ViewGroup parent) {
TweetViewHolder vh = TweetViewHolder.get(convertView, parent);
Tweet item = getItem(position);
vh.user.setText(item.user);
vh.tweet.setText(item.tweet);
@romannurik
romannurik / SwipeDismissListViewTouchListener.java
Last active May 1, 2021 10:16
**BETA** Android 4.0-style "Swipe to Dismiss" sample code
Moved to
https://github.com/romannurik/android-swipetodismiss