Skip to content

Instantly share code, notes, and snippets.

View JackDanger's full-sized avatar

Jack Danger JackDanger

View GitHub Profile
require 'rubygems'
require 'yaml'
require 'set'
SEATTLERB = [
'aaron patterson',
'alex vollmer',
'andy smith',
'damon danieli',
'dave myron',
# App Engine Rack
#
# Unified Script to build an JRuby App Engine
# app from scratch. Example app is Sinatra
# but any rack-enabled framework will work
# (e.g. Rails, Ramaze, your own custom app)
#
# Uncomment the lines near the bottom for installing
# the App Engine Java SDK if you don't have it
# already (but be warned: it's a 20MB+ download).
curl http://gist.github.com/raw/123391/da153dbf51dc343a9131bad6adc8a39f507c2531/app_engine_rack.sh -O
chmod +x app_engine_rack.sh
time ./app_engine_rack.sh
apt-get update
apt-get install -y apache2
apt-get install -y apache2-prefork-dev
apt-get install -y ruby1.8-dev
apt-get install -y git-core
apt-get install -y irb
# install newest rubygems
wget http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz
tar xzf rubygems-1.3.1.tgz
BUY: Stand By Me - Ben E. King
#Staying Alive - Bee Gees
BUY: Unchained Melodies - Righteous Bros
#Sweet Home Alabama - Leonard Skynard
#Simple Man - Leonard Skynard
#Wonderful World - Louis Armstrong
#My Next 30 Years - Tim McGraw
#Follow Me - Uncle Cracker
#I wanna love ya - Bob Marley
#Dust on a Bottle - David Lee Murphy(?)
(in /www/vendor/gen_smtp)
gen_smtp_server_session : FAILED
module 'gen_smtp_server_session'
gen_smtp_server_session: parse_encoded_address_test_ (Valid addresses should parse)...ok
gen_smtp_server_session: parse_encoded_address_test_ (Addresses that are sorta valid should parse)...[0.001 s] ok
gen_smtp_server_session: parse_encoded_address_test_ (Addresses containing unescaped <> that aren't at start/end should fail)...ok
gen_smtp_server_session: parse_encoded_address_test_ (Address that begins with < but doesn't end with a > should fail)...ok
gen_smtp_server_session: parse_encoded_address_test_ (Address that begins without < but ends with a > should fail)...ok
gen_smtp_server_session: parse_encoded_address_test_ (Address longer than 129 character should fail)...ok
gen_smtp_server_session: parse_encoded_address_test_ (Address with an invalid route should fail)...ok
@JackDanger
JackDanger / gist:177138
Created August 28, 2009 18:33
wx error while installing erlang otp r13b01 and r13b02 on mac OS X
If you're getting errors like this when attempting to configure Erlang OTP:
=== Entering application wx
make[3]: Nothing to be done for `opt'.
mkdir -p i386-apple-darwin9.8.0
g++ -c -I/usr/lib/wx/include/mac-unicode-debug-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXDEBUG__ -D__WXMAC__ -g -Wall -O2 -fPIC -fomit-frame-pointer -fno-strict-aliasing -no-cpp-precomp -D_MACOSX -D_THREAD_SAFE -D_REENTRANT -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_OPENGL_GL_H=1 -DHAVE_GL_SUPPORT=1 -DHAVE_GLINTPTR=1 -DHAVE_GLINTPTRARB=1 -DHAVE_GLCHAR=1 -DHAVE_GLCHARARB=1 -DHAVE_WX_STC_STC_H=1 -I/Users/studioda/otp_src_R13B02/erts/emulator/beam -I/Users/studioda/otp_src_R13B02/erts/emulator/sys/i386-apple-darwin9.8.0 -I/Users/studioda/otp_src_R13B0
If your erlang server throws this error when a client connects:
Downgrading ssl socket {sslsocket,new_ssl,<0.73.0>}
=INFO REPORT==== 28-Aug-2009::16:14:04 ===
SSL: Peer did not send close notify alert.
SSL handshake failed : closed
try starting your ssl:listen call with the option "{reuse_sessions, false}"
@JackDanger
JackDanger / listen.erl
Created August 30, 2009 05:55
simplest possible tcp listener in Erlang
%% NOTE: Do not use this. It's a constantly-evolving testbed for socket experiments
%% Use my socket.erl instead
-module(listen).
-export([start/0]).
start() ->
application:start(crypto),
application:start(ssl),
{ok, ListenSocket} = socket:listen(ssl, 56789),
# This works alright, I wouldn't use it without testing first though.
module KeepsCachedRecords
def self.included(base)
base.extend ClassMethods
class << base
alias_method_chain :find_one, :cached_records
alias_method_chain :find_some, :cached_records
alias_method_chain :find_every, :cached_records