Skip to content

Instantly share code, notes, and snippets.

Eric Allam ericallam

Block or report user

Report or block ericallam

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:251886
# put this in lib/nil_store.rb:
class NilStore < ActiveSupport::Cache::Store
def initialize(location='//myloc'); end
def read(name, options = nil); super; end
def write(name, value, options = nil); super; end
View wxkcd
#!/bin/bash
wget http://xkcd.com
wget `grep http://imgs.xkcd.com/comics/ index.html | head -1 | cut -d\" -f2` -O xkcd.png
rm index.html
open xkcd.png
View gist:421377
diff --git a/lib/socket.io/transports/websocket.js b/lib/socket.io/transports/websocket.js
index 381b77c..e32c57f 100644
--- a/lib/socket.io/transports/websocket.js
+++ b/lib/socket.io/transports/websocket.js
@@ -21,8 +21,8 @@ this.websocket = Client.extend({
'HTTP/1.1 101 Web Socket Protocol Handshake',
'Upgrade: WebSocket',
'Connection: Upgrade',
- 'WebSocket-Origin: ' + this.request.headers.origin,
- 'WebSocket-Location: ws://' + this.request.headers.host + this.request.url,
View database.yml
development:
adapter: mysql
database: grad100_dev
username: root
password:
host: localhost
encoding: utf8
test:
adapter: mysql
View gist:469621
HOMEBREW_VERSION: 0.6
HEAD:
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_CACHE: /Users/eric/Library/Caches/Homebrew
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew
Hardware: dual-core 64-bit penryn
OS X: 10.6.4
Kernel Architecture: i386
View gist:469778
==> Build Environment
CC: /usr/bin/cc
CXX: /usr/bin/c++
LD: /usr/bin/cc
CFLAGS: -O3 -march=core2 -msse4.1 -w -pipe
CXXFLAGS: -O3 -march=core2 -msse4.1 -w -pipe
MAKEFLAGS: -j2
PATH: ~/.seeds/bin:/usr/local/narwhal/bin:/opt/local/bin:/opt/local/sbin:/usr/local/Cellar/imagemagick/6.5.9-8/bin:/usr/local/bin:/usr/local/Cellar/ruby-enterprise-edition/2010.01/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin
==> Downloading http://jonas.nitro.dk/tig/releases/tig-0.15.tar.gz
File already downloaded and cached to /Users/eric/Library/Caches/Homebrew
View gist:469881
<?xml version="1.0" encoding="UTF-8"?>
<order>
...order xml...
<user>
<address1>111 Broadway</address1>
<address2></address2>
<bday type="date">1977-06-15</bday>
<city>Otown</city>
<first-name>Eric</first-name>
<gender>m</gender>
View gist:517695
POST /api/orders HTTP/1.1
Connection: close
Content-Type: text/xml
Authorization: Basic bXltZWRsYWI6TXlNM2RMNGJVNWVy
Content-Length: 816
Host: demo.bioiq.com
<?xml version="1.0" encoding="UTF-8"?>
<order>
<user>
View gist:527688
{
"include_tests": false,
"include_sample": false,
"jquery": "global",
"output_dir": "/public/bespin",
"search_path": ["/custom_plugins"],
"plugins": ["embedded", "screen_theme", "undomanager", "ruby_syntax"]
}
View gist:546208
@alt = ActionDispatch::Routing::RouteSet.new
@alt.draw do
controller :custom do
resources :tweets
end
end
def app
@alt
You can’t perform that action at this time.