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 'net/http' | |
pages = %w( www.rubycentral.com | |
www.awl.com | |
www.pragmaticprogrammer.com | |
) | |
threads = [] | |
for page in pages |
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 'mechanize' | |
require 'spreadsheet' | |
require 'json' | |
__FILE__ == $0 ? ( REPO_NAME = __FILE__.split(".")[0] ) : "" | |
def google_search(query) | |
agent = Mechanize.new |
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
thrive@thrive-laptop:~/rails_projects/skraper$ ruby share.rb | |
fetching: american chemical societyfetching: royal chemical society | |
fetching: berghahn booksfetching: bmj groupfetching: brill publishersfetching: cambridge university pressfetching: british ecological soietyfetching: cell pressfetching: cold spring harbor laboratoryfetching: edinburgh university pressfetching: siro publishingfetching: edp sciencesfetching: elsevier | |
fetching: hindawi publishingfetching: american institute of physicsfetching: indiana university press | |
fetching: informa | |
fetching: informsfetching: iop publishing | |
fetching: john benjamins | |
fetching: johns hopkins university press | |
fetching: maney publishing | |
fetching: mary ann liebert |
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 'mechanize' | |
require 'json' | |
__FILE__ == $0 ? ( REPO_NAME = __FILE__.split(".")[0] ) : "" | |
class String | |
def valid_json? | |
begin |
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
//////////////////////////// FABRICATE ////////////////////////////// | |
acrylic body | |
LH001/drawings/lh_frame.eps | |
compression rod supports | |
LH001/drawings/compression_rod_support.eps | |
///////////////////////////// ORDER ////////////////////////////////// | |
--- Pump Assembly --- |
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
## research_paper.rb | |
... | |
def testar | |
return 'derp' | |
end | |
## users_helper.rb | |
... | |
def invoke | |
return ResearchPaper.testar |
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
def foo(s) | |
p s # => "Creation of a bacterial cell controlled by a chemically synthesized genome" | |
bar(s) | |
p s # => "Creation+of+a+bacterial+cell+controlled+by+a+chemically+synthesized+genome" | |
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
uberchunk-ubu@uberchunk-ubu-desktop:~/rails_projects/hive$ rvm info | |
ruby-1.9.2-p290@hive: | |
system: | |
uname: "Linux uberchunk-ubu-desktop 2.6.32-33-generic #72-Ubuntu SMP Fri Jul 29 21:07:13 UTC 2011 x86_64 GNU/Linux" | |
bash: "/bin/bash => GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu)" | |
zsh: " => not installed" | |
rvm: |
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
uberchunk-ubu@uberchunk-ubu-desktop:~/rails_projects/hive$ gem install bundler | |
ERROR: Loading command: install (LoadError) | |
no such file to load -- zlib | |
ERROR: While executing gem ... (NameError) | |
uninitialized constant Gem::Commands::InstallCommand | |
uberchunk-ubu@uberchunk-ubu-desktop:~/rails_projects/hive$ |
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
uberchunk-ubu@uberchunk-ubu-desktop:~/rails_projects/hive$ sudo /usr/bin/apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion | |
Reading package lists... Done | |
Building dependency tree | |
Reading state information... Done | |
build-essential is already the newest version. | |
openssl is already the newest version. | |
libreadline6 is already the newest version. | |
libreadline6-dev is already the newest version. | |
curl is already the newest version. | |
git-core is already the newest version. |