:bad => to :good
:(\w+)\s*=>\s*
for
$1:
Comments [0]
Today I almost opened photoshop to resize a bunch of images, but then I rememebered: magick!
#!/bin/bash for i in *.jpg ; do convert "$i" -resize 720x720 "$i" done
Comments [0]
Don't ever assume that Rails 2.3.5 and 2.3.9 are interchangeable just because for months everything worked perfectly in development, test, qa and staging...
Production Day will teach you the hard way!
Comments [0]
Today I was playing around with R 3.1 and suddenly I wanted to submit a patch. Following the guide I tried to 'bundle' to be able to run the tests. OOPS!
Well, if your gem building joy is interrupted by a 404 trying to fetch the ruby source mentioned in your RVM, (for me Looking for http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p274.tar.gz), you can use a dirty workaround and install the specific gem with a flag:
gem install some_gem -- --with-ruby-include=/your_home/.rvm/src/ruby-1.9.2-head
/peace
Comments [0]
An autocomplete script is based on a dom element that uses javascript to generate asynchronous requests to a remote service and parse the response to offer matching choices to the user, if any is found.
Let's use a trivial Player model with a username method and build an autocomplete field for it.
View
Comments [0]
The use of the will_paginate gem with Sinatra is trivial, all you need to do is instruct your ORM about pagination and make the helpers available to the views. In addition to this, you also need to implement the url method for the LinkRenderer class. This snippet assumes the use or ActiveRecord :)
This is what I was thinking... Google it, find it, put it in your code and it should work..
Run this snippet and you will see what we're talking about!
This seems to be working:
Comments [0]