Install ImageMagick for image conversion:
brew install imagemagick
Install tesseract for OCR:
brew install tesseract --all-languages
Or install without --all-languages
and install them manually as needed.
{ | |
"_links": { | |
"self": { "href": "..." }, | |
"productions": { "href": "..." } | |
} | |
} |
Install ImageMagick for image conversion:
brew install imagemagick
Install tesseract for OCR:
brew install tesseract --all-languages
Or install without --all-languages
and install them manually as needed.
Efficient moving | |
Ctrl-a Move to the start of the line. | |
Ctrl-e Move to the end of the line. | |
Ctrl-b Move back one character. | |
Alt-b Move back one word. | |
Ctrl-f Move forward one character. | |
Alt-f Move forward one word. |
This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.
You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf
using homebrew.
#!/bin/bash | |
HEROKU="/home/yalab/.rvm/gems/ruby-1.9.3-p0/bin/heroku" | |
BACKUP_DIR="$HOME/.backup/mongohq" | |
if [ ! -d $BACKUP_DIR ];then | |
mkdir -p $BACKUP_DIR | |
fi | |
for APP in `$HEROKU list`;do | |
MONGOHQ_URL=`heroku config --app $APP | grep MONGOHQ_URL | awk '{print $3}'` |
#!/usr/bin/env ruby | |
# List all keys stored in memcache. | |
# Credit to Graham King at http://www.darkcoding.net/software/memcached-list-all-keys/ for the original article on how to get the data from memcache in the first place. | |
require 'net/telnet' | |
headings = %w(id expires bytes cache_key) | |
rows = [] |
# see http://stackoverflow.com/questions/5880962/how-to-destroy-jobs-enqueued-by-resque-workers - old version | |
# see https://github.com/defunkt/resque/issues/49 | |
# see http://redis.io/commands - new commands | |
namespace :resque do | |
desc "Clear pending tasks" | |
task :clear => :environment do | |
queues = Resque.queues | |
queues.each do |queue_name| | |
puts "Clearing #{queue_name}..." |
def pending_notifications | |
notifications = self.notifications | |
if last_notification_read_at | |
# Sqlite doesn't properly compare dates because doesn't have a dedicated | |
# type for it. | |
# TODO: Investigate further and find a better solution for this. | |
# | |
time_restriction = if connection.class.name.demodulize =~ /SQLite/ |
# Dependencies: pdftotext (included in xpdf) | |
# OSX: brew install xpdf | |
# Ubuntu/Debian: apt-get install xpdf | |
Then /^I should have get a pdf with the business name$/ do | |
page.response_headers['Content-Type'].should include 'application/pdf' | |
pdf_to_text.should include @current_business.name | |
end | |
def pdf_to_text |
Backbone.js on Rails @ #rcne2011
Nick Gauthier's presentation from Baltimore.rb