Office of Secret Intelligence

Who taught you to be a spy, fucking Gallagher!?!

Posts


Rails Asset Compression

I decided to give Google's Closure Compiler a try for this CMS.  I'm really happy with the amount of compression you can obtain (I don't personally have exact numbers, but I know my largest Javascript asset compressed down by at least half).  The one issue I have is the amount of time it takes (this link is a little old, but I can't find many new benchmarks comparing YUI and Closure: http://scoop.simplyexcited.co.uk/2009/11/24/yui-compressor-vs-google-closure-compiler-for-javascript-compression/).

 

This seems to speed page loading up a reasonable (at least noticeable) amount.  I'd like to get the load time for adsense and analytics externals down, but overall it's not horrible.  I'm going to set up Varnish for a reverse proxy cache and set up Redis for caching expensive database calls, once I've determined which are the most costly.


Links Work

I have enabled the full-featured TinyMCE editor for creating posts, so now I can spam links.  Most excellent!


ASCII Star Wars!

I saw this on a telnet server I think a while ago and it was wonderful: ASCII Star Wars


Good news, everyone!

After struggling around with mina and symbolic links, I decided just to go with S3.  Changing carrierwave around to use fog+s3 was a snap. 

I had originally had it set up that way, but I was trying to do dumb things with the filenames and it wasn't working properly.  Looks like things are doing ok now though.

In the next "patch" I'm going to fix this fucking tinymce editor.


Uploads and Mina

Mina creates a new directory for each release, and does an ln -s to the shared directory in the root app directory (for logs, app server sockets/pids, etc).  This is great and all but it's a pain in the ass for uploads, especially with Carrierwave.  If I provide the absolute path to the directory I want to write to, it works okay.  It won't display properly though, because it uses the absolute path instead of the relative when it constructs the URL.  If I use the relative URL, images that have already been uploaded display properly, but it won't write to the directory properly, as in, it won't write to the symlinked shared/ directory.  I have no fucking clue why, so I'm just going to use Fog and S3 since it'll be much cheaper anyway.

 

This is a learning experience.