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
def new_resource | |
resource = resource_service.new(params[resource_name]) | |
resource.user = current_user | |
resource | |
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
def problem_kind_abbr | |
if problem_kind == "selection" | |
"PSS_" | |
elsif problem_kind == "selection" | |
"SER_" | |
else- | |
"???_" | |
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
bill.description = if description = xml_document.at('titles/title[@type=official]') | |
description.text | |
end | |
bill.description = xml_document.at('titles/title[@type=official]') ? xml_document.at('titles/title[@type=official]').text : nil | |
bill.description = xml_document.at('titles/title[@type=official]') rescue nil | |
bill.description = description.text if description = xml_document.at('titles/title[@type=official]') |
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
You can use either http://vurl-staging.heroku.com or http://vurl.me for the server name. | |
veez ~ $ curl --data vurl[url]=http%3A%2F%2Fthing.com http://vurl-staging.heroku.com/vurls.xml | |
<?xml version="1.0" encoding="UTF-8"?> | |
<vurl> | |
<clicks-count type="integer">0</clicks-count> | |
<created-at type="datetime">2009-08-18T19:17:26-04:00</created-at> | |
<description></description> | |
<id type="integer">18</id> | |
<ip-address>127.0.0.1</ip-address> |
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
veez ~/code/rr09-team-128 (master)$ sudo gem install hashrocket-terraformation | |
Successfully installed hashrocket-terraformation-0.1.0 | |
1 gem installed | |
Installing ri documentation for hashrocket-terraformation-0.1.0... | |
File not found: lib | |
veez ~/code/rr09-team-128 (master)$ |
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 Time | |
alias :minute :min | |
alias :second :sec | |
end | |
def assign_clicked_at | |
%w(year month day hour minute second).each do |date_part| | |
self.send("clicked_at_#{date_part}=", created_at.send(date_part)) | |
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
describe "something else" do | |
let(:dealer) { Fabricate(:dealer) } | |
it { p dealer.id } #=> 38 | |
it { p dealer.id } #=> 39 | |
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
# ~/.bashrc.local | |
alias watch="watchr ~/.watchr.rb" | |
# ~/.watchr.rb | |
if File.exists?(".rspec") | |
@spec = 'rspec' | |
else | |
@spec = 'spec' | |
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
hcd dotmatrix | |
git fetch | |
git co -t origin/testify | |
./bin/hlink | |
. ~/.hashrc | |
hcd <project> | |
SAYIT=loud testify # => and then save a test! |
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
set wildmenu " allow tab to cycle through found options | |
set wildmode=list:longest |
OlderNewer