(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
/** | |
Workaround for iOS 6 setTimeout bug using requestAnimationFrame to simulate timers during Touch/Gesture-based events | |
Author: Jack Pattishall (jpattishall@gmail.com) | |
This code is free to use anywhere (MIT, etc.) | |
Note: UIWebView does not support requestAnimationFrames. If your timer is failing during a scroll event, | |
take a look at https://gist.github.com/ronkorving/3755461 for a potential workaround. | |
Usage: Pass TRUE as the final argument for setTimeout or setInterval. |
(function (window) { | |
// This library re-implements setTimeout, setInterval, clearTimeout, clearInterval for iOS6. | |
// iOS6 suffers from a bug that kills timers that are created while a page is scrolling. | |
// This library fixes that problem by recreating timers after scrolling finishes (with interval correction). | |
// This code is released in the public domain. Do with it what you want, without limitations. I do not promise | |
// that it works, or that I will provide support (don't sue me). | |
// Author: rkorving@wizcorp.jp | |
var timeouts = {}; |
class ActionDispatch::Routing::Mapper | |
def draw(routes_name) | |
instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb"))) | |
end | |
end | |
BCX::Application.routes.draw do | |
draw :api | |
draw :account | |
draw :session |
by Jonathan Rochkind, http://bibwild.wordpress.com
Capistrano automates pushing out a new version of your application to a deployment location.
I've been writing and deploying Rails apps for a while, but I avoided using Capistrano until recently. I've got a pretty simple one-host deployment, and even though everyone said Capistrano was great, every time I tried to get started I just got snowed under not being able to figure out exactly what I wanted to do, and figured I wasn't having that much trouble doing it "manually".
#To install ruby-debug on Ubuntu ruby-1.9.3 you need to download from http://rubyforge.org/frs/?group_id=8883 | |
linecache19-0.5.13.gem | |
ruby_core_source-0.1.5.gem | |
ruby-debug19-0.11.6.gem | |
ruby-debug-base19-0.11.26.gem | |
#Then in your console | |
export RVM_SRC=/your/path/to/ruby-1.9.3 |
# https://github.com/gzigzigzeo/carrierwave-meta | |
# Integrating CarrierWave with JCrop | |
# Let implement the behavior like at this demo: deepliquid.com/projects/Jcrop/demos.php?demo=thumbnail | |
# The uploader: | |
class CropUploader < SobakaUploader | |
include CarrierWave::Meta | |
# Crop source is a source image converted from original which could be bigger than source area (left image in the example). | |
version :crop_source do |
# initializers/devise.rb | |
config.omniauth :facebook, [APP_ID], [APP_SECRET] | |
config.omniauth :facebook_app1, [APP_ID], [APP_SECRET], :iframe => true, :scope => 'publish_stream,offline_access,email' | |
config.omniauth :facebook_app2, [APP_ID], [APP_SECRET], :iframe => true, :scope => 'publish_stream,offline_access,email' |
gem 'pg' | |
group :development do | |
gem 'ruby-debug' | |
end | |
gem 'rake', '~> 0.8.7' | |
gem 'devise' | |
gem 'oa-oauth', :require => 'omniauth/oauth' | |
gem 'omniauth' | |
gem 'haml' | |
gem 'dynamic_form' |