Skip to content

Instantly share code, notes, and snippets.

View MarcoMorawec's full-sized avatar

Marco Morawec MarcoMorawec

View GitHub Profile
<div class="my-wrapper">
<h2 class="custom-font-1 text-center">Sign up</h2>
<div class="span6 offset3 stolen-surfbox text-center">
<%= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
<%= f.error_notification %>
<div class="form-inputs">
CarrierWave.configure do |config|
if Rails.env.development?
config.storage = :file
else
config.storage = :fog
config.fog_credentials = {
:provider => 'AWS',
:aws_access_key_id => ENV['AWS_ACCESS_KEY'],
:aws_secret_access_key => ENV['AWS_SECRET_KEY']
}

Marco's Powerful Git Commands (standard)

  • git add --all : add everything that has been changed to the git
  • git status : tell me about the changes on the git repo
  • git commit -am "omg cats" : make a commit, with a note of "omg cats"
  • git push origin master : push the changes up to github
  • git push heroku master : push the changes up to heroku (the web environment). This is aka deploying.

To collaborate with each other:

Important Model Methods

I don't have an object yet

  • all Model.all => fetch all the items from the database
  • create Model.create(:hour => 1, :emotion => "super stoked")
    => create a new model in the database
  • new Model.new => build a new model but don't save it
  • first Model.first => fetches the first one