Category Archives: Development

CircleCI, Rails 5, Minitest, and avoiding the OptionParser::InvalidOption exception

After updating a project to rails 5 I was no longer able to use the minitest-ci gem without making a few changes. My project was failing with the following exception: /home/ubuntu/ebth-com/vendor/bundle/ruby/2.2.0/gems/railties-5.0.1/lib/rails/test_unit/minitest_plugin.rb:57:in `plugin_rails_options’: invalid option: –ci-dir=/tmp/circle-junit.pSCJhIM/minitest (OptionParser::InvalidOption) To fix I basically had to override the test command so –ci-dir wouldn’t be specified. Here is the process… Read More »

VTDecoderXPCService using 100% of your CPU? Use cputhrottle

Since upgrading to macOS Sierra (10.12.1) I’ve been having problems with the VTDecoderXPCService process spinning out of control. Closing the Messages app will fix this, but inevitably starting Messages at a later time will cause the problem to resurface. I didn’t really want to fire up IDA Pro and dig into why VTDecoderXPCService was doing… Read More »

PostgreSQL + Chef – Automatically configure based on server RAM

I was sick of changing shared_buffers, effective_cache_size, maintenance_work_mem, work_mem, SHMMAX, SHMALL each time we’d spin up a new server. So I decided instead to have chef calculate it for me! It takes the available RAM of the server and then calculates each value based on: shared_buffers = 25% of maximum memory maintenance_work_mem = 10% of… Read More »

Postgresql Activity Monitor Installation – pg_activity

Needed to install pg_activity on ubuntu 12.04 x64 and there were a decent amount of dependencies, here’s how to do it: sudo apt-get install git python2.7-dev libpq-dev python-setuptools git clone https://github.com/julmon/pg_activity.git cd pg_activity sudo python setup.py install sudo -u postgres pg_activity Done!