Skip to content

Instantly share code, notes, and snippets.

View amrnt's full-sized avatar

Amr Tamimi amrnt

View GitHub Profile
#require 'rubygems'
require 'pp'
#require 'ap' # Awesome Print
class Object
# expects [ [ symbol, *args ], ... ]
def recursive_send(*args)
args.inject(self) { |obj, m| obj.send(m.shift, *m) }
end
end
val text = """Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation pal pal ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute pal irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in Pal culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
@amrnt
amrnt / Gemfile
Created June 22, 2013 10:20
Ruby Ramallah - Day II
source "https://rubygems.org/"
gem 'sinatra'
gem 'nokogiri'
@amrnt
amrnt / pr.md
Created March 25, 2013 13:44 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

Twitter公式クライアントのコンシューマキー

Twitter for iPhone

Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU

Twitter for Android

Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for Google TV

Consumer key: iAtYJ4HpUVfIUoNnif1DA

@amrnt
amrnt / upgrade_psql.sh
Created February 9, 2013 12:47
Upgrading PostgreSQL
# from: 9.2.2
# to: 9.2.3
mv /usr/local/var/postgres /usr/local/var/postgresOLD
brew upgrade postgresql
initdb /usr/local/var/postgres -E utf8
pg_upgrade -b /usr/local/Cellar/postgresql/9.2.2/bin -B /usr/local/Cellar/postgresql/9.2.3/bin -d /usr/local/var/postgresOLD -D /usr/local/var/postgres
@amrnt
amrnt / gemspec-usage.md
Created December 10, 2012 23:24 — forked from holman/gemspec-usage.md
test/spec/mini

Just install this in your apps like so:

gem 'test-spec-mini', :git => 'git://gist.github.com/1806986.git', :require => 'mini'

@amrnt
amrnt / 0-readme.md
Created December 1, 2012 23:26 — forked from burke/0-readme.md
ruby-1.9.3-p327 cumulative performance patch for rbenv

ruby-1.9.3-p327 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@amrnt
amrnt / gist:3660339
Created September 6, 2012 20:59
SublimeLinter instructions
Package Control Messages
========================
SublimeLinter:
-------------
SublimeLinter
=============
SublimeLinter is a plugin that supports "lint" programs (known as "linters"). SublimeLinter highlights
@amrnt
amrnt / Gemfile
Created August 11, 2012 18:29 — forked from igrigorik/Gemfile
HTML5 SSE / EventSource demo with Goliath
source :gemcutter
gem 'goliath', :git => 'git://github.com/postrank-labs/goliath.git'
gem 'em-synchrony', :git => 'git://github.com/igrigorik/em-synchrony.git'