brew uninstall imagemagick | |
cd /usr/local/Cellar | |
git checkout 834ce4a /usr/local/Library/Formula/imagemagick.rb | |
brew install imagemagick |
/* | |
* | |
* There is now an Angular directive, filter and provider! | |
* It can be found here: https://github.com/i18next/ng-i18next | |
* ng-i18next is now part of the i18next rganization! | |
* | |
*/ | |
/* | |
* AngularJS directive for using i18next (http://jamuhl.github.com/i18next) |
run: | |
rbenv install ./2.2.2-railsexpress | |
or edit install.sh to include the RUBY_VERSION you want to install and run the script. |
require 'socket' | |
socket = TCPServer.new('0.0.0.0', '8080') | |
socket.setsockopt(Socket::SOL_SOCKET, Socket::SO_REUSEADDR, 1) | |
loop do | |
client = socket.accept | |
data = '' | |
loop do | |
event = select([client],nil,nil,0.5) | |
if client.eof? # Socket's been closed by the client |
ruby_block "create ssh key" do | |
block do | |
k = SSHKey.generate(:type => 'RSA', :bits => 1024, :comment => "Postgres Master") | |
node.set[:postgresql][:pubkey] = k.ssh_public_key | |
node.save | |
# Much of the DSL disappears in ruby blocks. Here's how to create a template. | |
rc = Chef::RunContext.new(node, node.cookbook_collection) | |
t = Chef::Resource::Template.new "/var/lib/postgresql/.ssh/id_rsa" | |
t.source("id_rsa.erb") |
With Rails 3.0 released a few weeks ago I've migrated a few apps and I'm constantly finding useful new improvements. One such improvement is the ability to log anything in the same way that Rails internally logs ActiveRecord and ActionView. By default Rails 3 logs look slightly spiffier than those produced by Rails 2.3: (notice the second line has been cleaned up)
Started GET "/" for 127.0.0.1 at Mon Sep 06 01:07:11 -0400 2010
Processing by HomeController#index as HTML
User Load (0.2ms) SELECT `users`.* FROM `users` WHERE (`users`.`id` = 3) LIMIT 1
CACHE (0.0ms) SELECT `users`.* FROM `users` WHERE (`users`.`id` = 3) LIMIT 1
Rendered layouts/_nav.html.erb (363.4ms)
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
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.
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.