Skip to content

Instantly share code, notes, and snippets.

View joncode's full-sized avatar
🏠
Launching Apps

Jon Anders joncode

🏠
Launching Apps
  • Agent1 / Suma / Squad.fyi / Splice / Lucera / Couchtour.tv / Hedera / Giftlocal / Sarson Funds / Dial / Manifest.ai
  • Philadelphia, PA
View GitHub Profile
@joncode
joncode / gist:2640541
Created May 8, 2012 23:55
Heroku upload
gem install heroku in app
heroku keys:add
- i told it to use id_dsa.pub instead of id_rsa.pub
heroku create --stack cedar drivein
- app name is driveIn
- stack cedar is best heroku branch to deploy to
git push heroku master
@joncode
joncode / gist:2655306
Created May 10, 2012 19:31
Heroku upload problems
gem "twitter-bootstrap-rails", "~> 2.0.1.0"
- do not put in group :assets
@import font may need to b commented out
linkto stylesheets and javascript_link calls
- delete them
- do not have double calls between those and the //= require statements in application .js & .css
user get default items for photo_urls etc
@joncode
joncode / gist:2713367
Created May 16, 2012 19:43
github terminal alias commands - awesome!
alias ll="ls -lahG"
alias cdr='cd ~/rails'
alias gs='git status'
alias gl='git pull'
alias gp='git push'
alias gm='git merge'
alias gap='git add -p'
alias gaa='git add .'
@joncode
joncode / gist:2714929
Created May 16, 2012 23:40
Production Asset pipeline deploy precompile
rake assets:precompile
- will precompile assets
check config/environment/production.rb
config.serve_static_assets = true
- to simulate server serving static assets in production
config.assets.precompile += %w( plugins.js , script.js )
- if javascript assets are not precompiling, you must specifically include them here
rails server -e production
@joncode
joncode / .bash_profile
Created May 17, 2012 20:08
New Computer Install Mac OSX 10.7.4
PS1="\n\w \n ::: [ll] [cdr] [bi] [rdbm] [rs] [rc] [gk] [gph] [gphm] [hl] [hr] [hrdb] \n :: [gs] [gb] [gba] [gco] [gcb] [gap] [gaa] [gc] [gca] [gm] [gd] [gl] [gp] \n :) -> "
alias ll="ls -lahG"
alias cdr='cd ~/rails'
alias gs='git status'
alias gl='git pull'
alias gp='git push'
alias gm='git merge'
alias gap='git add -p'
alias gaa='git add .'
@joncode
joncode / gist:2727699
Created May 18, 2012 21:31
Design Truth
design is 99% efficiency and 1% ingenuity
@joncode
joncode / gist:2764257
Created May 21, 2012 19:51
instance variables into Partials
<%= render 'option_associations',option: option, collection:[ @body_types, @themes, @products] %>
in this example, instance variables are @options, @body_types, @themes, @products
@options.each do |option|
--- partial is rendered with option and the collection instance variables ...
use collection: to push instance variables into a partial
use option: option -- to push local variable into partial as local variable
@joncode
joncode / gist:2773795
Created May 23, 2012 08:03
update attribute without validation
use update_column
http://edgeapi.rubyonrails.org/classes/ActiveRecord/Persistence.html#method-i-update_column
@joncode
joncode / gist:2840663
Created May 31, 2012 02:57
clone repo into different repo
make new repo on github w/ rails .gitignore
clone new repo to computer
in the terminal in your local repo
- git pull git@github.com:joncode/template1.git
or
- git merge git@github.com:joncode/template1
- git pull git@github.com:joncode/template1.git
bundle install
rake db:migrate
@joncode
joncode / gist:2841552
Created May 31, 2012 06:55
git asks for username and password every time on git push - how to stop
git config -l
does remote.origin.url = git @github.com/joncode/filename.git ?
ie ... is the a '/' between github.com and joncode
if so
git config remote.origin.url git@github:joncode/filename.git
should fix it