This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import _root_.net.liftweb.util._ | |
import _root_.net.liftweb.json._ | |
import _root_.net.liftweb.common._ | |
import _root_.java.net.{HttpURLConnection, URL, URLEncoder} | |
import JsonAST._ | |
import JsonDSL._ | |
import JsonParser._ | |
import Helpers._ | |
//flickr uses some proprietary authentication mechanism instead of oauth |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* jquery plugin to replace emoji utf-8 characters with the iPhone glyphs. | |
* code adapted from here: https://github.com/konstantinov/jQuery.emoji | |
* | |
* Get your glyphs here: | |
* wget http://pukupi.com/post/1964/ -O - | perl -ne '/(e\d{3}.png)/ && print "http://pukupi.com/media/emoji/$1\n"' | xargs wget | |
* | |
* someone (Apple?) probably has copyright on the glyphs, not sure about reuse rules. | |
*/ | |
$.fn.emoji = function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2011 Foursquare Labs Inc. All Rights Reserved. | |
package com.foursquare.snippet | |
import com.foursquare.lib._ | |
import net.liftweb.common._ | |
import net.liftweb.http._ | |
import net.liftweb.util._ | |
import net.liftweb.util.Helpers._ | |
import scala.xml._ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dear Hoffman, | |
I am Barr. Chris Jacobs, an Attorney at law, and the personal lawyer/friend to late Engineer M.A. Hoffman, a foreigner who used to work with Shell International, Lome, Republic of Togo, herein, after shall be referred to as my late client/friend. I have contacted the white and yellow pages in search of his relatives but unfortunately did not succeed. As it may interest you to know, I got your contact through the internet professional Data Base by divine inspiration as I was going through some directories. I decided to contact you in order to champion a business of this magnitude without any problem. | |
On the 21st of April 2005, my client, his wife and their two children were involved in a car accident along Kara-Sokode Expressway while arriving from a holiday to Lome. All occupants of the vehicle unfortunately lost their lives. Since then, I have made several inquiries to their embassy to locate any of their extended relatives and this has also proved unsuccessful. I am contacting you to assist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python | |
from subprocess import Popen | |
import sys, os, urllib2 | |
try: | |
import json | |
except ImportError: | |
import simplejson as json | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import commands | |
import pymongo | |
import time | |
from pymongo import Connection | |
from boto.ec2.connection import EC2Connection | |
host = '127.0.0.1' | |
timestamp = time.strftime("%Y-%m-%d-%H-%M") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import memcache | |
import re | |
import subprocess | |
import sys | |
KESTREL_HOST = 'localhost:22133' | |
def record(name, value): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.HashMap; | |
import java.util.Map; | |
public class LRUCache<K, V> { | |
private final Map<K, Pair<Node<K>, V>> map = new HashMap<K, Pair<Node<K>,V>>(); | |
private Node<K> head = null; | |
private Node<K> tail = null; | |
private final int maxSize; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import atexit | |
import datetime | |
from datetime import timedelta | |
import logging | |
import os | |
import smtplib | |
import subprocess as sub | |
import sys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package jon.trace; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.io.PrintWriter; | |
import java.net.InetSocketAddress; | |
import java.util.Iterator; | |
import java.util.List; | |
import java.util.Set; | |
import java.util.concurrent.Executors; |