Skip to content

Instantly share code, notes, and snippets.

//
// UPnP.cs: UPnP Device Discovery Test.
//
// Authors:
// Eric Butler <eric@extremeboredom.net>
//
// (C) 2006 FileFind.net (http://filefind.net)
//
using System;
//
// C# wrapper around the ImageMagick Wand API
//
// Authors:
// Eric Butler <eric@extremeboredom.net>
//
// (C) 2006 Eric Butler
//
// See http://www.imagemagick.org/script/magick-wand.php
//
--- babl/babl-cpuaccel.c.orig 2010-06-17 16:16:52.000000000 -0700
+++ babl/babl-cpuaccel.c 2010-06-17 16:16:55.000000000 -0700
@@ -74,7 +74,7 @@
}
-#if defined(ARCH_X86) && defined(USE_MMX) && defined(__GNUC__)
+#if defined(ARCH_X86) && defined(USE_MMX) && defined(__GNUC__) && defined(CHEESY)
#define HAVE_ACCEL 1
/*
RubyMarshal.js: De-marshal ruby objects from JavaScript.
Ported by Eric Butler <eric@codebutler.com>
Based on code from the Rubinus project.
Copyright (c) 2007, Evan Phoenix
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
#!/usr/bin/python
import urllib
import hashlib
import hmac
import json
URL = 'http://stumble.to/api/update'
API_KEY = 'YOUR_KEY_GOES_HERE'
lnmp_site 'caphillcouncil' do
domains [ 'caphillcouncil.org', 'www.caphillcouncil.org', 'capitolhillcommunitycouncil.org', 'www.capitolhillcommunitycouncil.org' ]
db_name 'caphill'
db_username 'caphill'
db_password 'xxxx'
php_cgi_port 9005
end
@codebutler
codebutler / inbox-bankruptcy.rb
Created January 27, 2011 04:21
declare gmail inbox bankruptcy
require 'rubygems'
require 'gmail'
require 'gmail_xoauth'
NAME = "Eric Butler"
EMAIL = 'eric@codebutler.com'
TOKEN = 'CHANGEME'
TOKEN_SECRET = 'CHANGEME'
CONSUMER_KEY = 'anonymous'
@codebutler
codebutler / JsonHelper.java
Created April 8, 2012 20:20
Convert Android JSONObject/JSONArray to a standard Map/List.
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.*;
public class JsonHelper {
public static Object toJSON(Object object) throws JSONException {
if (object instanceof Map) {
JSONObject json = new JSONObject();
@codebutler
codebutler / install-tapchat-irssi.sh
Created May 2, 2012 21:40
TapChat for Irssi installer
#!/bin/bash
# TapChat for Irssi Installer
#
# Authors:
# Eric Butler <eric@codebutler.com>
#
# See http://tapchatapp.com for more information
APT_PACKAGES="libanyevent-http-perl libnet-ssleay-perl libuuid-tiny-perl liburi-query-perl libauthen-passphrase-perl libdbd-sqlite3-perl libdbix-class-perl libcrypt-generatepassword-perl libcrypt-cbc-perl libcrypt-rijndael-perl libmime-base64-urlsafe-perl liburi-encode-perl"
@codebutler
codebutler / FieldValidator.java
Created May 10, 2012 21:16
Simple helper to validate android form fields
import android.app.Activity;
import android.content.Context;
import android.text.InputType;
import android.text.TextUtils;
import android.view.View;
import android.widget.EditText;
import com.humaorie.dollar.Dollar;
import static com.humaorie.dollar.Dollar.$;