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
| everynone: 0 | |
| animalcolm: 7 | |
| aam: 0 | |
| alexlora: 0 | |
| caviarcontent: 0 | |
| ruairirobinson: 0 | |
| danieldaniel: 0 | |
| sweatshopped: 0 | |
| vjurjen: 0 | |
| cokau: 0 |
| javascript:function%20bkload()%7Bvar%20d=document,z=d.createElement('scr'+'ipt'),b=d.body;try%7Bif(!b)throw(0);d.title='(Loading...)%20'+d.title;z.setAttribute('src','//community.vhx.tv/videos/bookmarklet.js');b.appendChild(z)%7Dcatch(e)%7Balert('Please%20wait%20until%20the%20page%20has%20loaded.')%7D%7Dbkload();void(0); |
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 $? |