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 Thing | |
def self.say_hello | |
puts "Hello from ####" | |
end | |
class << self | |
def say_hello | |
puts "Hello from ####" | |
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
main_class = MainClass.new | |
main_class.extend(MixInA) | |
class << main_class; undef :say_hello; 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
desc 'Clean up lookups, remove units form values and names' | |
task :remove_units_from_lookups => :environment do | |
types = [ | |
:rafter_spacings, :basic_wind_speeds, | |
:ground_snow_loads, :average_roof_heights | |
] | |
types.each do |type| | |
Lookup.type_of(type).each do |lookup| | |
next unless lookup.name.scan(/[^\d.]/).any? |
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
http://www.dreamr.xxx |
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
<div class="clearfix"> | |
<%- form.label("race") %> | |
<div class="input"> | |
<%- form.input( 'race' ) %> | |
</div> | |
</div> |
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
new InfoBubble({ | |
arrowPosition: 50, | |
arrowSize: 10, | |
arrowStyle: 0, | |
backgroundClassName: 'property asset small bubble', | |
backgroundColor: '#FFF', | |
borderColor: '#F0F0F0', | |
borderRadius: 3, | |
borderWidth: 1, | |
content: $('div#marker_info_#{marker.id}').html(), |
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
#!/bin/sh | |
## .git/hooks/pre-commit | |
bundle exec rake db:migrate | |
bundle exec rake db:test:prepare | |
bundle exec rake test |
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
{:docs=>[{:id=>1, :"region-tz-min-offset"=>-480, :"dispensary-name"=>"dr. greenthumb garden supply 1", :"dispensary-slug"=>"dr-greenthumb-garden-supply-1", :"title-pc"=>"Dr. Greenthumb Garden Supply 1", :"dispensary-rating-power"=>"5.0000", :"dispensary-created"=>"1970-01-01T00:00:00.000Z", :video_url=>nil, :"dispensary-region-slug"=>"lake-tahoe", :"super-region-id"=>2, :"super-region-name"=>"California", :"super-region-slug"=>"california", :"dispensary-has-videos"=>0, :"dispensary-has-gpen"=>0, :"dispensary-hits"=>0, :hits=>0, :"reviewer-count"=>1, :intro=>"Hello body text", :"dispensary-intro"=>"Hello body text", :name=>"dr. greenthumb garden supply 1", :"name-phrase"=>"dr. greenthumb garden supply 1", :phone=>"555-555-5555", :zip=>"12345", :city=>"lake tahoe", :"city-phrase"=>"Lake Tahoe", :state=>"CA", :latitude=>32.751117, :longitude=>-117.213405, :location=>"32.751117,-117.213405", :featured=>1, :type=>"dispensary", :"within-5-mi-of"=>[], :"within-25-mi-of"=>[], :"within-50-mi-of"=>[], :"within-100-mi-o |
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
{:docs=>[{:id=>1, | |
:"region-tz-min-offset"=>-480, | |
:"dispensary-name"=>"dr. greenthumb garden supply 1", | |
:"dispensary-slug"=>"dr-greenthumb-garden-supply-1", | |
:"title-pc"=>"Dr. Greenthumb Garden Supply 1", | |
:"dispensary-rating-power"=>"5.0000", | |
:"dispensary-created"=>"1970-01-01T00:00:00.000Z", :video_url=>nil, | |
:"dispensary-region-slug"=>"lake-tahoe", | |
:"super-region-id"=>2, | |
:"super-region-name"=>"California", |
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
if 5+5 == 10#topic.save! | |
else #Error Saving | |
p "#{topic.errors.full_messages}" | |
pp topic.attributes | |
20.times { p "------------------" } | |
errs << ["#{topic.errors.full_messages}", topic.attributes] | |
# output/log why no save | |
end |