Here’s a quick command you can use to find any folders that are over a GB in size on a Linux OS.
sudo du -h / | grep '[0-9\.]\+G'
Here’s a quick command you can use to find any folders that are over a GB in size on a Linux OS.
sudo du -h / | grep '[0-9\.]\+G'
I recently found myself with the need to connect to a Mongo DB instance from a PHP application running on Amazon EC2. The PHP docs led me to this MongoDB extension, which seemed to be a good fit for my needs. Still, the matter of installation was a little bit less clear, considering that the EC2 instance was pretty barebones and lacked a fair number of the “standard” libraries that would enable this single line installation to work.
After a bit of finagling, I got everything to work via the steps I’ve outlined below.
Here’s a list of MIME Types for Office 2007 files (those pesky files extensions that end with an x). Useful for file type checking in web applications and the like.
Coda ships with syntax highlighting support for a lot of great languages, but some are noticeably left out of the mix. I was recently helping a buddy set up an environment to develop C programs on an external server, and while Coda seemed a clear better alternative to using Nano (particularly since we could still compile and run the programs from Coda’s built-in terminal), the program lacked syntax highlighting for the C language.
Adding highlighting for C (and a host of other languages) turned out to be pretty easy.
To add support for other languages, download this zip file, unzip, and copy the Modes folder into Contents > Resources of the Coda package distribution. To access the contents of the package, right click on the Coda application and select “Show Package Contents”. Then navigate to Contents > Resources.
If you are asked, overwrite existing folders and files. Note that if you only want to install certain syntax highlighting modes, just copy and paste what you need (of the .mode files in the downloaded Modes folder) into the Modes folder in the Coda package. I forgot which languages were standard to Coda so I’ve just included all of the ones I have in the download.
I was recently doing some prototyping with Laravel, the self-proclaimed “PHP Framework for Web Artisans”. It seems to be gaining quite some traction within the framework community, and it boasts some cool features such as dependency injection via an Inversion of Control container and a groovy command-line interface called Artisan. Even better, the framework documentation is clearly written, detailed enough to dig beneath surface level, and (most importantly) it works.
Laravel ships with its own home-brewed ORM called Eloquent (based on the Active Record pattern), but I wanted to see how easy or difficult it would be to integrate another popular ORM, Propel, into the framework. This would be an important consideration if a project were already using Propel with another framework, but wanted to transition to Laravel without having to rewrite its data mappings. I found a solid post online that outlined an integration for Laravel 4 and Propel 1.6, but Propel is now in version 2 so some steps were no longer accurate. I ended up figuring my way around the integration, and wanted to share my notes in this post.