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
| require 'irb/ext/save-history' | |
| IRB.conf[:SAVE_HISTORY] = 100 | |
| IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history" | |
| # require 'irb/completion' | |
| # IRB Options | |
| IRB.conf[:AUTO_INDENT] = true | |
| # require 'irb/completion' |
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
| /* get full dom path to the element */ | |
| var path = []; | |
| var el = $0; | |
| do { | |
| path.unshift(el.nodeName + (el.className ? ' class="' + el.className + '"' : '')); | |
| } while ((el.nodeName.toLowerCase() != 'html') && (el = el.parentNode)); | |
| console.log(path.join(" > ")); |
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
| require 'open-uri' | |
| require 'nokogiri' | |
| require 'erb' | |
| include ERB::Util | |
| q=url_encode("site:shipspotting.com 7224693 IMO") | |
| doc = Nokogiri::HTML(open("http://www.google.com/search?q=#{q}")) | |
| #link = doc.css("h3.r > a").first |
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
| gem "configatron" | |
| gem 'rest_in_place' | |
| gem "foreman", :git => 'git://github.com/ddollar/foreman.git' # must be ~> 0.28.0 to support comments | |
| gem "nifty-generators" | |
| gem 'formtastic' | |
| gem 'haml-rails' | |
| gem "breadcrumbs_on_rails" |
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/bash | |
| date=`date +"%Y%m%d%H%M%S"` | |
| pwd=`pwd` | |
| pwd=~/Desktop | |
| filename="${pwd}/scanned_${date}.tif" | |
| echo "Finding device..." | |
| device=$(scanimage -L | cut -d ' ' -f 2 | sed -e "s/[\`\|\']//g") | |
| echo "got ${device}" |
NewerOlder