MustModify Blog: All Posts for

Getting started generating PDFs with Prince

June 11, 2010
Download and uncompress Prince: --- jw@gallifrey:~$ curl http://www.princexml.com/download/prince-7.1-linux.tar.gz -o prince.tar.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 3879k 100 3879k 0 0 763k 0 0:00:05 ...


Session Data / Cookies don't persist in IE

May 21, 2010
Rails fails with 500 I spent at least six hours isolating this issue so I thought I'd save someone else some trouble. Say you have a site fu.com ... if you're doing any SEO work (or if you just want things to be clean) you'll 301 redirect all traffic from fu.com to www.fu.com. You can do this with Rails with a before_filter in your Rails...


[Valuable] parsing attributes

May 17, 2010
This post is me thinking 'out loud' about how to add custom parsing "ruby gem valuable":http://valuable.mustmodify.com In the past I ran into quite a few situations where I wanted to parse / process / format certain attributes as they came in. There seemed to be a lull in that so I hadn't implemented it, but now I find myself wanting it again....


using actual numbers with putty and vim

April 14, 2010
I'd been having troubles wherein I would try to use my numeric keypad in VIM but would get letters. Instead of 123456 I would get qrstuv. The fix for me was a putty setting... Terminal > Features > Disable application keypad mode should be checked. REFERENCE: "Putty numeric keypad...


rspec says: undefined method 'should_receive' for SomeClass

April 13, 2010
This took up an hour of my life today. Here's the fix. At some point I'll go back and research "Double Ruby":http://github.com/btakita/rr to figure out what went wrong, but for now, tests are failing validly... ---diff --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -20,7 +20,7 @@ Spec::Runner.configure do |config| ...


tail - follow two to n files at once

January 27, 2010
I often use tail -f filename.txt ... then recently I realized I was switching back and forth between test.log and development.log, and that only one was being used at a time -- could I follow both at the same time? Turns out you can, and really easily. --- tail -f file1.txt file2.txt --- or even --- tail -f log/*.log --- useful and...


regenerating httpd.include from capistrano with sudo

November 19, 2009
As a general rule, if you need to do something with sudo in your cap scripts, and you don't know why that might be a bad idea, something has gone wrong. I recently ran in to an exception. For various reasons, we need to auto-generate our httpd.include file after deploying to production. note: command names have been change to protect me from...


Show alert messages in firebug

October 26, 2009
A cool javascript trick: --- alert = console.log --- then --- alert('hello') --- will show up in Firebug instead of an alert screen: --- "hello"