I hereby claim:
- I am davebrace on github.
- I am davebrace (https://keybase.io/davebrace) on keybase.
- I have a public key whose fingerprint is 5BE6 E5D9 1B4A D2E2 1E78 4ABB B6FA B6A0 5498 6E6E
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| require "csv" | |
| require "public_suffix" | |
| require "active_support/all" | |
| require "resolv" | |
| def parse_domain(url) | |
| return url unless url.present? | |
| domain = url.strip.match(/\A(https?:\/\/(www\.)?)?([^\/]*)\/?/i)[3].downcase | |
| parsed_domain = PublicSuffix.parse(domain).domain | |
| rescue PublicSuffix::DomainInvalid |
| # Put the following lines in your Codeship Setup section | |
| ## Install Neo4j | |
| wget -O neo4j-community-2.1.5.tar.gz http://neo4j.com/artifact.php?name=neo4j-community-2.1.5-unix.tar.gz | |
| tar -xzvf neo4j-community-2.1.5.tar.gz | |
| # configure neo4j to run on testing ports (7476 + 7475) | |
| sed -i s/7474/7476/g neo4j-community-2.1.5/conf/neo4j-server.properties | |
| sed -i s/7473/7475/g neo4j-community-2.1.5/conf/neo4j-server.properties | |
| neo4j-community-2.1.5/bin/neo4j start | |
| bundle exec rspec spec --tag data_store:neo4j |
| { | |
| "color_scheme": "Packages/Solarized Color Scheme/Solarized (light).tmTheme", | |
| "ensure_newline_at_eof_on_save": true, | |
| "folder_exclude_patterns": | |
| [ | |
| "log", | |
| "tmp", | |
| ".git" | |
| ], | |
| "font_size": 22, |
| git config --global mergetool.p4merge.path 'C:\Program Files\Perforce\p4merge.exe' | |
| git config --global merge.tool p4merge |
| heroku pgbackups:capture --expire -a myapp | |
| heroku pg:reset `heroku config -a myapp-staging | grep -o "\w*POSTGRESQL\w*"` -a myapp-staging | |
| heroku pgbackups:restore `heroku config -a myapp-staging | grep -o "\w*POSTGRESQL\w*"` `heroku pgbackups:url --app myapp` --app myapp-staging | |
| heroku run rake db:migrate -a myapp-staging | |
| heroku restart -a myapp-staging |
| require 'open-uri' | |
| require 'nokogiri' | |
| doc = Nokogiri::HTML(open('http://www.amazon.com/Datacolor-Spyder4Pro-S4P100-Colorimeter-Calibration/dp/B006TF37H8')) | |
| images = doc.xpath('//img/@src').map {|n| n.value } | |
| title = doc.xpath('//title').text | |
| prices = doc.to_s.scan(/\$(\d+(?:\.\d{1,2})?)/) |