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
#!/usr/bin/env ruby | |
require 'csv' | |
# Real men use ruby1.9 thus not needing rubygems require and FasterCSV was | |
# folded into std-lib csv. Plus I had all these lines to waste on snarky | |
# comments. :P | |
puts CSV.read("joe.csv").flatten!.inject(Hash.new(0)) {|h,x| h[x] += 1; h} | |
# hnguyen@taengoo:~ ಠ_ಠ >> ./huy.rb |
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
#Need the latest version so it knows where to get ruby-1.9.3 | |
rvm get head | |
curl -O https://github.com/ruby/ruby/pull/56.diff | |
rvm install ruby-1.9.3-p0 --patch 56.diff | |
cd ~/.rvm/src/ruby-1.9.3-p0 | |
# Need to recompile because rvm doesn't force autoconf? |
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
hnguyen@hnguyen:~/github/showme_rbx$ gem install rails --pre --no-ri --no-rdoc | |
Fetching: multi_json-1.0.3.gem (100%) | |
Fetching: activesupport-3.1.0.rc3.gem (100%) | |
Fetching: builder-3.0.0.gem (100%) | |
Fetching: i18n-0.6.0.gem (100%) | |
Fetching: bcrypt-ruby-2.1.4.gem (100%) | |
Building native extensions. This could take a while... | |
Fetching: activemodel-3.1.0.rc3.gem (100%) | |
Fetching: rack-1.3.0.gem (100%) | |
Fetching: rack-cache-1.0.2.gem (100%) |
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
ree-1.8.7-2011.03 :024 > hb788.document.path | |
=> "/home/hnguyen/github/opengovernment/public/system/bill_documents/000/021/611/original/streamdocument.asp" | |
ree-1.8.7-2011.03 :025 > Docsplit.extract_text(hb788.document.path, :ocr => false, :pages => 'all', :output => 'public/') | |
Docsplit::ExtractionFailed: Exception in thread "main" org.artofsolving.jodconverter.office.OfficeException: could not load document: streamdocument.asp | |
at org.artofsolving.jodconverter.AbstractConversionTask.loadDocument(AbstractConversionTask.java:101) | |
at org.artofsolving.jodconverter.AbstractConversionTask.execute(AbstractConversionTask.java:62) | |
at org.artofsolving.jodconverter.office.PooledOfficeManager$2.run(PooledOfficeManager.java:81) | |
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) | |
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) | |
at java.util.concurrent.FutureTask.run(FutureTask.java:138) |
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
This file contains any messages produced by compilers while | |
running configure, to aid debugging if configure makes a mistake. | |
It was created by nitrogen configure 1.5.1, which was | |
generated by GNU Autoconf 2.65. Invocation command line was | |
$ ./configure --enable-debug | |
## --------- ## | |
## Platform. ## |
NewerOlder