git checkout -b branch-name
git status (use often as needed)
git add .
git commit -m "Description"
git checkout master
git merge branch-name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1><%= markdown_to_html @post.title %></h1> | |
<div class="row"> | |
<div class="col-md-8"> | |
<small> | |
<%= image_tag(@post.user.avatar.tiny.url) if @post.user.avatar? %> | |
submitted <%= time_ago_in_words(@post.created_at) %> ago by | |
<%= @post.user.name %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Dog | |
def initialize(breed, color) | |
@breed, @color = breed, color | |
end | |
def describe_me | |
"I am a #{@breed} and I am #{@color}" | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
User | |
has_many :recipes | |
- name | |
- location | |
Recipe | |
belongs_to :user | |
has_many :recipe_fermentables |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for f in app/views/devise/**/*.erb; do html2haml -e $f ${f%erb}haml && rm $f; done |
We can make this file beautiful and searchable if this error is corrected: No tabs found in this TSV file in line 0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
First Name Last Name Email Address Phone Number Company Name | |
Gerhard Kautzer [email protected] 1-207-643-1816 Hodkiewicz-Lynch | |
Myra Crona [email protected] (724)196-9470 x998 Champlin-Hahn | |
Josh Donnelly [email protected] 081-799-3139 x248 Casper Group | |
Verna Farrell [email protected] 731.101.6219 Rosenbaum-Hane | |
Lauriane Stracke [email protected] 1-033-511-1831 x471 Prohaska-Sporer | |
Kaya Luettgen [email protected] (511)745-9273 Wyman, Trantow and Hane | |
Steve Davis [email protected] 787.315.2611 x747 Kuhic-Lowe | |
Citlalli Pfeffer [email protected] 329-584-6962 x047 Gorczany and Sons | |
Litzy Turcotte [email protected] 1-084-641-4078 x4410 Hintz-Schmitt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin random-color($selector) { | |
#{$selector}: unquote("rgba(#{random(256) - 1}, #{random(256)-1}, #{random(256 - 1)}, #{random(100)/100})"); | |
} | |
$tags: (h1, h2, h3, h4, h5, p, li, a, strong, small, em); | |
@each $tag in $tags { | |
#{$tag} { | |
@include random-color('color'); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% @items.each do |item| %> | |
<p> | |
<%= item.name %> | |
<%= form_for [current_user, item], method: :delete do |f| %> | |
<%= check_box_tag :complete, nil, false, onclick: "this.form.submit()" %> | |
<%= label_tag :complete, 'Complete' %> | |
<% end %> | |
</p> | |
<% end %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% flash.each do |k,v| %> | |
<div class="alert alert-<%= k == 'notice' ? 'info' : 'danger' %> fade in"> | |
<button class="close" data-dismiss="alert"> | |
<i class="fa fa-fw fa-info"></i> | |
<strong><Info><%= k %>!</strong> <%= raw(v) %> | |
</button> | |
</div> | |
<% end %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TopicsController < ApplicationController | |
before_action :require_sign_in, except: [:index, :show] | |
before_action :authorize!, except: [:index, :show] | |
def index | |
@topics = Topic.all | |
end | |
def new | |
@topic = Topic.new |