Launch the instance and connect with ssh.
##Update the server
sudo yum update
##Install php and MySQL packages
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl https://npmjs.org/install.sh | sh |
| /** | |
| * Enhanced Select2 Dropmenus | |
| * | |
| * @AJAX Mode - When in this mode, your value will be an object (or array of objects) of the data used by Select2 | |
| * This change is so that you do not have to do an additional query yourself on top of Select2's own query | |
| * @params [options] {object} The configuration options passed to $.fn.select2(). Refer to the documentation | |
| */ | |
| angular.module('ui.directives').directive('uiSelect2', ['ui.config', '$timeout', '$parse', function (uiConfig, $timeout, $parse) { | |
| var options = {}; | |
| if (uiConfig.select2) { |
| /** | |
| * Thanks to @philsturgeon for pointing this package | |
| * and Filipe Dobreira "https://github.com/filp" for creating it ^^ | |
| * Github : https://github.com/filp/whoops | |
| * How to: | |
| * Step 1 : Setup composer for Laravel 3 | |
| * Step 2 : Add this code to your application/start.php or anywhere u like | |
| * as long its after laravel registers its own error handlers | |
| * so NOT in : index.php, paths.php or laravel/** | |
| * |
| <pre> | |
| <?php | |
| // ---------------------- CONFIG DETAILS ---------------------- | |
| //branch in git | |
| $BRANCH = 'master'; | |
| // --------- You should not need to edit below here ------------ | |
| $current_sha1 = `git rev-parse $BRANCH`; | |
| $status_of_branch = `git ls-remote origin -h refs/heads/$BRANCH`; |
| /* | |
| * Adapted from: http://code.google.com/p/gaequery/source/browse/trunk/src/static/scripts/jquery.autogrow-textarea.js | |
| * | |
| * Works nicely with the following styles: | |
| * textarea { | |
| * resize: none; | |
| * transition: 0.05s; | |
| * -moz-transition: 0.05s; | |
| * -webkit-transition: 0.05s; | |
| * -o-transition: 0.05s; |
| <?php | |
| // app/start/global.php | |
| /* | |
| |-------------------------------------------------------------------------- | |
| | Application Error Logger | |
| |-------------------------------------------------------------------------- | |
| | | |
| | Here we will configure the error logger setup for the application which |
| <!doctype html> | |
| <html ng-app="project"> | |
| <head> | |
| <title>Angular: Service example</title> | |
| <script src="http://code.angularjs.org/angular-1.0.1.js"></script> | |
| <script> | |
| var projectModule = angular.module('project',[]); | |
| projectModule.factory('theService', function() { | |
| return { |
Launch the instance and connect with ssh.
##Update the server
sudo yum update
##Install php and MySQL packages
| /* | |
| Note the white space in the $page variable. | |
| $page is set somewhere up here and is being concatenated upon. | |
| These units are in bytes. | |
| Sourced from: http://stackoverflow.com/questions/2192657/how-to-determine-the-memory-footprint-size-of-a-variable | |
| */ | |
| // WITHOUT WHITE SPACE: http://screencloud.net/img/screenshots/e5c9b31c4b20021082c22a551fca903c.png | |
| $start_memory = memory_get_usage(); |