I hereby claim:
- I am johnd on github.
- I am semanticist (https://keybase.io/semanticist) on keybase.
- I have a public key whose fingerprint is EBE2 C121 15D5 171E DFA7 7C86 A1B0 0076 674E CA69
To claim this, I am signing this object:
| require 'rubygems' | |
| require 'open-uri' | |
| require 'nokogiri' | |
| gem 'twitter' | |
| require 'twitter' | |
| TWITTER_USERNAME = 'NorthernRockSVR' | |
| TWITTER_PASSWORD = 'password' | |
| LAST_FILE = File.expand_path(File.dirname(__FILE__)) + "/last_svr" |
| # BUZZWORD BINGO | |
| # Depends on the 'prawn' gem | |
| WORDS = ["Bottom Line", | |
| "Main Thing", | |
| "Synergise", | |
| "Innovate", | |
| "Pain Point", | |
| "Growth Potential", | |
| "The Cloud", |
| class Configuration | |
| attr_accessor :tail_logs, :max_connections, :admin_password | |
| def app_server(&block) | |
| @app_server_config ||= AppServer.new | |
| block.call @app_server_config if block_given? | |
| @app_server_config | |
| end | |
| end |
| module Mod | |
| def my_accessor(field) | |
| @my_attributes ||= Array.new | |
| Mod.add_all_attributes(field) | |
| attr_accessor field | |
| @my_attributes << field | |
| end | |
| class Article < ActiveRecord::Base | |
| after_validation :ensure_no_published_at_dates_in_the_future | |
| # ... | |
| private | |
| def ensure_no_published_at_dates_in_the_future | |
| self.published_at = Date.today if self.published_at > Date.today | |
| end |
| case "$UID" in | |
| 0) | |
| user_colour="00;31" | |
| ;; | |
| *) | |
| user_colour="00;36" | |
| ;; | |
| esac | |
| case "$TERM" in |
| require 'rubygems' | |
| require 'nokogiri' | |
| require 'open-uri' | |
| URL = "http://www.dixons.co.uk/gbuk/r/touchpad/0_0_0/" | |
| SELECTOR = ".prd-amount strong" | |
| TARGET_PRICE = "89" |
| john@SLAB:~/Dropbox/Code$ rvm all --verbose do ruby explict_implicit_bm.rb | |
| jruby-1.6.5: jruby 1.6.5 (ruby-1.8.7-p330) (2011-10-25 9dcd388) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_51) [darwin-x86_64-java] | |
| Rehearsal -------------------------------------------- | |
| explicit 0.397000 0.000000 0.397000 ( 0.368000) | |
| implicit 0.339000 0.000000 0.339000 ( 0.339000) | |
| ----------------------------------- total: 0.736000sec | |
| user system total real | |
| explicit 0.340000 0.000000 0.340000 ( 0.340000) | |
| implicit 0.355000 0.000000 0.355000 ( 0.355000) |
| #!/bin/bash | |
| while /usr/bin/curl -s "http://www.myvue.com/latest-movies/info/cinema/Edinburgh%20Ocean%20Terminal/film/doctor-who-the-day-of-the-doctor-3d" | /usr/bin/grep "Sorry, there are no times" | |
| do | |
| echo "nope" | |
| done | |
| echo "yup" |
I hereby claim:
To claim this, I am signing this object: