Pinterest Chrome Extension – Disable “Pin It” on Hover

You can easily disable this as an individual who has installed the extension, but if you don’t want it to conflict with any other social software you may have on your site, all you need to do is add this to ever IMG tag: <img src=”myimage.jpg” data-pin-no-hover /> Or you can use nopin.  Found in… 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 »

Ruby – Uploading files greater than 5GB to Amazon S3

I was struggling with finding a method to upload files greater than 5GB to S3 using the Amazon aws-s3 gem, then I came across this great post by Gavin. I’m adding the code here in case the site eventually goes down. All credit to Gavin! #!/usr/bin/env ruby # # Testing multipart uploads into s3 with… Read More »

Rails testing – Setup multiple databases when running rake spec

We currently have 2 databases for our application and I had a need to basically setup both databases, our test database, and another stats database. I also noticed an issue where running rake spec wouldn’t run in the test environment, which we always wanted it to run it. My solution is the below (Note: We… 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!

PHP and SSH2 Class – Easily put/get files

I wrote a short little helper class for retrieving files using the ssh2 library w/PHP.  Don’t forget to enable/install it to your PHP installation!   Credits to Random Drake for the listing/downloading code

Pattern Maker for IDA

So I recently purchase IDA 6.1 and quickly realized that the majority of plugins available online were simply compiled for windows, but no source! One example was pattern maker that was originally posted here. Unfortunately the source was lost, so I decided to attempt to re-create it. It simply gives you patterns for the disassembly… Read More »