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 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(); |
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
| require 'rubygems' | |
| require 'gmail' | |
| require 'gmail_xoauth' | |
| NAME = "Eric Butler" | |
| EMAIL = 'eric@codebutler.com' | |
| TOKEN = 'CHANGEME' | |
| TOKEN_SECRET = 'CHANGEME' | |
| CONSUMER_KEY = 'anonymous' |
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
| 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 |
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 | |
| import urllib | |
| import hashlib | |
| import hmac | |
| import json | |
| URL = 'http://stumble.to/api/update' | |
| API_KEY = 'YOUR_KEY_GOES_HERE' |
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
| /* | |
| 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: |
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
| --- 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 |
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
| // | |
| // 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 | |
| // |
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
| // | |
| // UPnP.cs: UPnP Device Discovery Test. | |
| // | |
| // Authors: | |
| // Eric Butler <eric@extremeboredom.net> | |
| // | |
| // (C) 2006 FileFind.net (http://filefind.net) | |
| // | |
| using System; |
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/ruby | |
| # XXX: Don't hardcode these paths! | |
| require '/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_view/helpers/number_helper.rb' | |
| require '/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/core_ext/numeric/bytes.rb' | |
| include ActiveSupport::CoreExtensions::Numeric::Bytes | |
| include ActionView::Helpers::NumberHelper | |
| BLOCKSIZE = 1024 |
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
| #!/bin/sh | |
| set -e | |
| ip4=$1 | |
| echo "$ip4" | grep -q '^[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*$' || \ | |
| { echo 'Syntax: $0 a.b.c.d'; exit 1; } | |
| prefix=$(printf '%02x%02x:%02x%02x\n' $(echo $ip4 | sed 's/\./ /g')) |