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
~/Documents/workspace/contracts [17:21:37] [ruby-2.0.0-p247@rails3] $ rails c | |
Loading development environment (Rails 3.2.15) | |
[17] main » digest = OpenSSL::Digest::MD5.new | |
(pry) output error: #<TypeError: no implicit conversion of Object into String> |
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
<div id='search_div'> | |
<input type="text" class="search-query" id="search_text"> | |
<button class="btn" id='search_button'><i class='icon-search'></i></button> | |
</div> | |
<address id="2106"> | |
<strong>RandoZZ ZZMcCracken</strong><br> | |
<small>home:</small> <a href="mailto:home@email.com">home@email.com</a><br><small>work:</small> <a href="mailto:work@email.com">work@email.com</a><br><small>primary:</small> <a href="mailto:primary@email.com">primary@email.com</a><br><small>other:</small> <a href="mailto:other@email.com">other@email.com</a><br> | |
<small>home phone:</small> 1-310-555-5555 <br><small>work phone:</small> 1-310-555-3333 <br><small>cell phone:</small> 1.310.555.1212 | |
</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
[4] pry(main)> asd = ('A'..'Z') | |
=> "A".."Z" | |
[5] pry(main)> asd.each do |p| | |
[5] pry(main)* puts p | |
[5] pry(main)* end | |
A | |
B | |
C | |
D | |
E |
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
Example:: v.first == "1,000" or v.first == "$15,000.00" | |
<td> | |
<div> | |
<span title=<%= !v.first.nil? ? v.first.gsub(',', '') : nil %>></span> | |
<% v.each do |col_value| %> | |
<%= col_value %> | |
<% end %> | |
</div> | |
</td> |
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
cat /Users/.rvm/gems/ruby-2.0.0-p0@gems/gems/therubyracer-0.11.4/ext/v8/gem_make.out | |
/Users/.rvm/rubies/ruby-2.0.0-p0/bin/ruby extconf.rb | |
checking for main() in -lpthread... yes | |
checking for main() in -lobjc... yes | |
creating Makefile | |
make | |
compiling accessor.cc | |
accessor.cc:1: error: bad value (corei7) for -march= switch | |
accessor.cc:1: error: bad value (corei7) for -mtune= switch |
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
Netflix Keynote: | |
@caseyrosethal | |
AWS - three regions. (US-W, US-E, EU) | |
300 + Microservices :: Dev ownership includes Deployment and Uptime | |
Software is getting more complex: | |
--how we interact with software | |
mobile. IoT. rapid rate of change. |
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 self.clean(value, level) | |
case level | |
when 1 #strip html and tags | |
results = Sanitize.clean(value) | |
when 2 #includes level 1, regex to allow symbols | |
leveltwo = Sanitize.clean(value) | |
leveltwo.strip! | |
results = leveltwo.gsub(/[^0-9a-zA-Z\(\)\|\:\/\,\'\.\-\@\_\[\]\&\?\=\s]/, "") |
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
asd = Price.where("min_color <= ? AND min_qty <= ? ", 1, 34) |
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
@select_options = { "value" => "value", "name" => "name" } | |
<%= select_tag 'group_by', options_from_collection_for_select(@select_options, "value", "name") %> |
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 data_links_helper(data, model) | |
output = "" | |
for report in data | |
output << "<tr>" | |
report.each do |k,v| | |
output << "<td>#{v}</td>" | |
end | |