hipchat with software rendering
If you get this error message: “Hipchat could not initiate hardware for rendering video”, you can start hipchat with software rendering like this:
zeus custom plan
I wanted that zeus would reload all my shared examples for each test. This required the following custom plan.
To get zeus to use it, add a zeus.json with the following content:
ruby profiling with ruby-prof
Useful snippet to profile a piece of code:
After this, you’ll have a timestamped file containing benchmark results. Really useful for optimization.
ruby command line filtering
I wanted to be able to filter the API calls that took longer than 1200ms from a logentries log. Lines are in the following format:
The following does the trick:
rbtrace ruby debug production mode
This can be useful to debug something in production mode. Add rbtrace to your Gemfile, and start your servers in production mode. In my case, I needed to debug unicorn in production mode. I did a:
And found the pid of one of the unicorn worker process. After that:
exposing a host service to a vagrant instance
I wanted to allow vagrant to connect to host’s postgres: