(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
class API::V1::BaseController < ApplicationController | |
skip_before_filter :verify_authenticity_token | |
before_filter :cors_preflight_check | |
after_filter :cors_set_access_control_headers | |
def cors_set_access_control_headers | |
headers['Access-Control-Allow-Origin'] = '*' | |
headers['Access-Control-Allow-Methods'] = 'POST, GET, PUT, DELETE, OPTIONS' |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
group :production do | |
gem 'unicorn' | |
# Enable gzip compression on heroku, but don't compress images. | |
gem 'heroku-deflater' | |
# Heroku injects it if it's not in there already | |
gem 'rails_12factor' | |
end |
#app/inputs/collection_check_boxes_input.rb | |
class CollectionCheckBoxesInput < SimpleForm::Inputs::CollectionCheckBoxesInput | |
def item_wrapper_class | |
"checkbox-inline" | |
end | |
end |
NOTE: This post now lives (and kept up to date) on my blog: http://hakunin.com/rails3-load-paths
Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.
sys_rb_usr=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr | |
sdk_rb_usr=`xcode-select -p`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr | |
sudo cp -r $sdk_rb_usr/include $sys_rb_usr/include |
Updated: July 2nd (XE7)
Ron Amadeo of Android Police did a review of these experiments: http://www.androidpolice.com/2013/05/24/google-glasss-hidden-labs-features-ok-glass-everywhere-web-browsing-video-stabilization-and-more-video/
Google Glass has a series of Labs experiments that can be enabled on engineering or userdebug builds. Using APKTool, I've removed that restriction and now they can be enabled with root access.
To start, for example, the SOUND_SEARCH lab, type in a root shell
if | |
[ -f "$rvm_path/scripts/rvm" ] | |
then | |
__env="$( "$rvm_path/bin/rvm" env --path )" | |
if | |
[ -n "$__env" ] && | |
[ -s "$__env" ] | |
then | |
source "$__env" | |
fi |
// YOUR ANGULAR SERVICE | |
clientApp.factory('Mongo', function($resource) { | |
// $resource(url[, paramDefaults][, actions]); | |
return $resource('http://localhost\\:8000/api/:action/:huddleId', | |
{ | |
action: '@action', | |
huddleId: '@huddleId' | |
}, | |
{ |
web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb |