This file contains 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
##### EXPORTS ################################################################ | |
export PATH=/opt/local/bin:/opt/local/sbin:$HOME/bin:$PATH | |
export LC_CTYPE=en_US.UTF-8 | |
# Editors | |
export EDITOR='mate -w' | |
export SVN_EDITOR='mate -w' | |
export GIT_EDITOR='mate -w' | |
# for Editor Kicker: http://editorkicker.rubyforge.org/ | |
export EDITOR_KICKER="mate -l %s '%s'" |
This file contains 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
/* syntax.css for pygments */ | |
/* from http://github.com/mojombo/tpw/blob/master/css/syntax.css */ | |
.highlight { background: #ffffff; } | |
.highlight .c { color: #999988; font-style: italic } /* Comment */ | |
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ | |
.highlight .k { font-weight: bold } /* Keyword */ | |
.highlight .o { font-weight: bold } /* Operator */ | |
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */ | |
.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */ |
This file contains 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
// The `quickEach` method will pass a non-unique jQuery instance | |
// to the callback meaning that there will be no need to instantiate | |
// a fresh jQuery instance on each iteration. Most of the slow-down | |
// inherent in jQuery's native iterator method (`each`) is the constant | |
// need to have access to jQuery's methods, and so most developers | |
// see constructing multiple instances as no issue... E.g. | |
// $(...).each(function(){ $(this)... $(this)... $(this)... }); | |
// A better approach would be `quickEach`. | |
jQuery.fn.quickEach = (function(){ |
This file contains 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
global | |
maxconn 4096 | |
user haproxy | |
group haproxy | |
debug | |
defaults | |
timeout client 60000 | |
timeout server 30000 | |
timeout connect 4000 |
This file contains 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
FactoryGirl.define do | |
sequence :email do |n| | |
"user#{n}@example.com" | |
end | |
factory :user do | |
password "test" | |
aliased_as :author | |
end |
This file contains 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
# -------------------------------------------------------- | |
export APXS2=`which apxs` | |
export CFLAGS="-arch x86_64 -O2" | |
export ARCHFLAGS="-arch x86_64" | |
export EDITOR='mate -w' | |
export CLICOLOR=1 | |
export TERM=xterm-color | |
export LSCOLORS=DxGxcxdxCxegedabagacad | |
export LC_CTYPE=en_US.UTF-8 |
This file contains 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 '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 |
This file contains 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
# acceptance/acceptance_helper.rb | |
require File.expand_path(File.dirname(__FILE__) + "/../spec_helper") | |
# Put your acceptance spec helpers inside /spec/acceptance/support | |
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f} |
This file contains 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
# autoload concerns | |
module YourApp | |
class Application < Rails::Application | |
config.autoload_paths += %W( | |
#{config.root}/app/controllers/concerns | |
#{config.root}/app/models/concerns | |
) | |
end | |
end |
This file contains 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
final WifiManager mWifiManager = (WifiManager) getSystemService(WIFI_SERVICE); | |
if(mWifiManager.getWifiState() == WifiManager.WIFI_STATE_ENABLED) { | |
// register WiFi scan results receiver | |
IntentFilter filter = new IntentFilter(); | |
filter.addAction(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION); | |
registerReceiver(new BroadcastReceiver(){ | |
@Override |
OlderNewer