This file contains 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
$ git fetch -p | |
remote: Counting objects: 1, done. | |
remote: Total 1 (delta 0), reused 1 (delta 0) | |
Unpacking objects: 100% (1/1), done. | |
f9b6959..3ff6575 master -> origin/master | |
x [deleted] (none) -> origin/admin-review-purchase-orders | |
x [deleted] (none) -> origin/creator-email-notifications | |
x [deleted] (none) -> origin/new-purchase-order | |
x [deleted] (none) -> origin/po-status-changes |
This file contains 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
module Cappy | |
def attr_capcessor attr | |
attr_reader attr.to_sym | |
define_method "#{attr}=" do |value| | |
instance_variable_set("@#{attr}", value.to_s.upcase) | |
end | |
end | |
end |
This file contains 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
Item.create(name: 'one record, one query') # One SQL Insert Query | |
multiple_items = [{ name: 'record one'}, { name: 'record two' }] | |
Item.create(multiple_items) # Two Consecutive SQL Insert Queries |
This file contains 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
mkdir site/public/{images,js,css} | |
ls site/public | |
images js css |
This file contains 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
# Minitest | |
it "should create a new credit card" do | |
from_hash = CreditCard.create_from_hash(hash) | |
assert from_hash.valid? | |
assert from_hash.number == number | |
assert from_hash.cvv == cvv | |
assert from_hash.expiry_month == expiry_month | |
assert from_hash.expiry_year == expiry_year | |
end |
This file contains 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
Process: JavaAppLauncher [69398] | |
Path: /Users/USER/*/app.app/Contents/MacOS/JavaAppLauncher | |
Identifier: com.hackety.shoes.app | |
Version: 1.0 (0.0.0) | |
Code Type: X86-64 (Native) | |
Parent Process: launchd [233] | |
Responsible: JavaAppLauncher [69398] | |
User ID: 501 | |
Date/Time: 2013-11-12 17:27:24.529 +0000 |
This file contains 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
module Invite | |
module_function | |
def Invite(people) | |
Invitees.new(people) | |
end | |
class Invitees | |
attr_reader :recipients | |
def initialize people |
This file contains 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 LastTracks | |
attr_accessor :session, :list | |
def initialize(session) | |
@session = session | |
@list = [] | |
yield(self) | |
end | |
def blacklist(url) |
This file contains 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 Delorean | |
# set_coodinates | |
# ============== | |
# | |
# ## REQUIRES: | |
# | |
# - abbr_time => "07:30" | |
# | |
# ## RETURNS: | |
# An instance of Delorean. |
This file contains 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 InMemoryStore | |
attr_accessor :result_set | |
def initialize | |
@result_set = [] | |
end | |
def store(row) | |
!!(result_set << row) | |
end |
OlderNewer