Awesome vim setup

Among the editors and IDEs that I use the old stand by vim is always there. It’s literally the first thing I install on a server. One of the great features of vim is the vast plugin library. This becomes even better when someone wraps a lot of the extremely useful ones in to an installable package.

Enter SPF13 vim by Steve Francia.

It has my favorite plugin NERDTree plus a ton of others that I didn’t know I loved until I installed this package.

This is an awesome vim setup!

One word of warning vim needs to be 7.4+ for the plugins installed with the installer to work.

Rsync over ssh between remote servers

In order to use rsync with a ssh key I used the -e flag on the rsync command. It will allow rsync over ssh local to a remote server.


[$ ~] rsync -avz -e "ssh -i .ssh/id_key.pem" /opt/stuff/here/ [email protected]:/opt/stuff/here/

How to set Laravel 4 environments

The environment is based on url matches.

You’ll find that configuration in /bootstrap/start.php

$env = $app->detectEnvironment(array(

'local' => array('your-machine-name'),

));

Now say you are developing locally and use the prefix/postfix local. E.g: my-new-site.local or local.my-new-site

$env = $app->detectEnvironment(array(

'local' => array('local.*','*.local'),

));

That sets the environment, now to use it you’ll need to create a local folder in /app/config/

mkdir app/config/local

And so you want to have a different database configuration for local. Just copy the database config file in to the local directory and modify it.

cp app/config/database.php app/config/local/database.php

Why I don’t use AppFog

Simple no persistant storage. Starting up, setting up, etc are all great, but without persistance storage I’m forced to use S3 or the like. If I’m doing a very simple app or a WordPress install it’s not worth the effort.

Does AppFog have a persistent file system?

Not yet. We’re working on this feature, but in the meantime, the file system is volatile. This means that any changes you make to the file system through a web interface, including any admin changes and content uploads, will be lost on the app’s next start, stop, restart, deploy, or resource change. Because of this, you should make any changes to the file system on a local development environment and keep media assets and content uploads on an external storage system like Amazon’s S3.

Source