Checkout new repo
git clone git@github.com:vhx/watchlater
go into your vhx folder
cd ~/dev/vhx
Checks current status of modified files
git status
Shows you all the current modifications
Checkout new repo
git clone git@github.com:vhx/watchlater
go into your vhx folder
cd ~/dev/vhx
Checks current status of modified files
git status
Shows you all the current modifications
| class ApplicationController | |
| after_filter :set_access_control_headers | |
| def set_access_control_headers | |
| # Any domain | |
| # headers['Access-Control-Allow-Origin'] = '*' | |
| # Specific domain |
| # config/environments/production.rb | |
| # We're on Heroku, just output straight to STDOUT | |
| # This is required because we're using Unicorn, too: https://github.com/ryanb/cancan/issues/511#issuecomment-3643266 | |
| config.logger = Logger.new(STDOUT) | |
| config.logger.level = Logger.const_get(ENV['LOG_LEVEL'] ? ENV['LOG_LEVEL'].upcase : 'INFO') |
| $ cat config/initializers/new_relic_reconnect.rb | |
| # Ensure the agent is started using Unicorn | |
| # This is needed when using Unicorn and preload_app is not set to true. | |
| # See http://support.newrelic.com/kb/troubleshooting/unicorn-no-data | |
| NewRelic::Agent.after_fork(:force_reconnect => true) if defined? Unicorn |
| web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb |
| class ThingsController < ApplicationController | |
| before_filter :get_thing!, :only => [:show] | |
| before_filter :friends_only!, :only => [:show] | |
| def show | |
| render @thing | |
| end |
| json = ActiveSupport::JSON.decode(google)['predictions'] | |
| # sort of traditional for() loop style | |
| results = [] | |
| json.each do |location| | |
| results << { | |
| :short => 'foo', | |
| :long => 'bar' | |
| } | |
| end |
| $ cat deploy | |
| #!/bin/sh | |
| # any extra arguments are passed to `git push`, e.g. -f | |
| app='vhx-artists' | |
| remote='heroku' | |
| git push $remote master $1 || exit $? | |
| heroku run rake assets:precompile --app=$app || exit $? |
| # config/environments/production.rb | |
| # We're on Heroku, just output straight to STDOUT | |
| # This is required because we're using Unicorn: https://github.com/ryanb/cancan/issues/511#issuecomment-3643266 | |
| config.logger = Logger.new(STDOUT) | |
| config.logger.level = Logger.const_get(ENV['LOG_LEVEL'] ? ENV['LOG_LEVEL'].upcase : 'INFO') |
| <meta property="og:type" content="vhxtv_ns:video" /> | |
| <meta property="og:title" content="Brimley's Breath" /> | |
| <meta property="og:image" content="http://b.vimeocdn.com/ts/617/924/61792473_200.jpg" /> | |
| <meta property="og:description" content="From inaugural Tricorn" /> | |
| <meta property="og:url" content="http://vhx.tv/1234" /> | |
| <meta property="og:video" content="http://www.vimeo.com/moogaloop.swf?clip_id=3102336" /> | |
| <meta property="og:video:url" content="http://vimeo.com/3102336" /> | |
| <meta property="og:video:type" content="application/x-shockwave-flash" /> | |
| <meta property="og:video:width" content="560" /> | |
| <meta property="og:video:height" content="315" /> |