How to set up a RAM drive

lots of RAMOnce you try a solid state drive you never go back. It’s blazingly fast. I complement that experience with a RAM drive to store temporal files, cache and disposable files (screenshots, unzipped files, downloaded attachments).

I’ll explain you how to set up a RAM disk. Spoiler: the hardest part of installing it is downloading the program you’ll need to create it.
Continue reading

Automatically minify CSS and JavaScript files using Git hooks


Commented CSS codeWhen I write my CSS code, it usually looks like the screenshot on the right: I use big text made with FIGlet (using this tool) so I can find a section of code fast just by looking at SublimeText‘s minimap. There are also useful comments along the code. Those comments are great while we are working, but if they were left on production they would yield several bytes of overhead.
The JavaScript code is commented too (without big text, in this case) and it also has many spaces for identation.


There are many tools to reduce the size of both CSS and JavaScript files. In this case I chose YUI Compressor for CSS and Closure compiler for JavaScript. I decided to apply them automatically just before making a commit, using a pre-commit hook.
Keep reading to see how to implement this!
Continue reading