Skip to content

Instantly share code, notes, and snippets.

@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
@dsiebel
dsiebel / Base64.java
Created April 1, 2011 14:47
Static encoding / decoding class for Base64
public class Base64 {
private final static char[] ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".toCharArray();
private static int[] toInt = new int[128];
static {
for(int i=0; i< ALPHABET.length; i++){
toInt[ALPHABET[i]]= i;
}
@ashigeru
ashigeru / gist:876124
Created March 18, 2011 14:08
modelgen2
# エンティティの定義
# これに対するクラスができる
Body = {
item_id : string;
price : decimal;
};
# 射影の定義
# これに対するインターフェースができる
@fragment Header = {
anonymous
anonymous / RestartableDevAppServerMain.java
Created January 11, 2011 14:20
Restartable DevAppServer (Google App Engine for Java)
package natntech;
import java.io.OutputStream;
import java.net.InetSocketAddress;
import java.net.ServerSocket;
import java.net.Socket;
import com.google.appengine.tools.development.DevAppServerMain;
/**