git init
Creates a new git repository in the directory
git add <file name>
Adds a specific file to staging
git add .
orgit add -A
Adds the full directory and its contents to staging
#require 'sidekiq/api' | |
# 1. Clear retry set | |
Sidekiq::RetrySet.new.clear | |
# 2. Clear scheduled jobs | |
Sidekiq::ScheduledSet.new.clear |
class Change | |
def change(amount) | |
available_coins = [100,50,25,10,5,1] # http://en.wikipedia.org/wiki/Coins_of_the_United_States_dollar | |
coins = [] | |
index = 0 | |
coin = available_coins[index] | |
remaining_amount = amount | |
until remaining_amount == 0 | |
until remaining_amount >= coin | |
index = index + 1 |
require 'active_record' | |
ActiveRecord::Base.logger = Logger.new(STDERR) | |
ActiveRecord::Base.colorize_logging = false | |
ActiveRecord::Base.establish_connection( | |
:adapter => "sqlite3", | |
:dbfile => ":memory:" | |
) |
<h2><%= plural_table_name.titleize %></h2> | |
<p id="notice"><%%= notice %></p> | |
<hr> | |
<div> | |
<%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %> | |
<div class="content"> | |
<% attributes.reject(&:password_digest?).each do |attribute| -%> |