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}" |
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
| 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
| /* 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 '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
| require 'open-uri' | |
| require 'nokogiri' | |
| require 'erb' | |
| include ERB::Util | |
| q=url_encode("site:shipspotting.com 7811032 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
| snippet rip | |
| .rest-in-place{'data-attribute' => '${1}'} |
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
| # using VestalVersions | |
| # gem 'vestal_versions', :git => 'git://github.com/adamcooper/vestal_versions' # don't work with rails 3.1 | |
| gem 'vestal_versions', :git => 'git://github.com/jodosha/vestal_versions' # this work with 3.1 | |
| VestalVersions::Version.where(:versioned_type => "Place") |
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
| # custom generators in rails | |
| # for example using haml instead of pure html in r g scaffold | |
| git clone git://github.com/pjb3/rails3-generators.git lib/generators | |
| # config/application.rb | |
| config.generators do |g| | |
| g.template_engine :haml | |
| g.test_framework :rspec, :fixture => true, :views => false | |
| g.fixture_replacement :factory_girl, :dir => "spec/factories" | |
| 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
| # rails hgignore | |
| syntax: glob | |
| *~ | |
| .bundle | |
| .*swp | |
| db/*.sqlite3 | |
| doc/app/* | |
| log/*.log | |
| tmp/**/* | |
| .git |
OlderNewer