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://www.npmjs.org/install.sh | sh |
| var http = require("http"), | |
| url = require("url"), | |
| path = require("path"), | |
| fs = require("fs") | |
| port = process.argv[2] || 8888; | |
| http.createServer(function(request, response) { | |
| var uri = url.parse(request.url).pathname | |
| , filename = path.join(process.cwd(), uri); |
Launch the instance and connect with ssh.
##Update the server
sudo yum update
##Install php and MySQL packages
| { | |
| "use_simple_full_screen": false, | |
| // calculates indentation automatically when pressing enter | |
| "auto_indent": true, | |
| // sets the colors used within the text area (default) | |
| // see https://github.com/olivierlacan/monokaim to download | |
| // the customized Monokai I use. | |
| "color_scheme": "Packages/Color Scheme - Default/Monokaim.tmTheme", |
Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...
| <!-- Add the following lines to theme's html code right before </head> --> | |
| <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script> | |
| <script src="http://static.tumblr.com/fpifyru/VCxlv9xwi/writecapture.js"></script> | |
| <script src="http://static.tumblr.com/fpifyru/AKFlv9zdu/embedgist.js"></script> | |
| <!-- | |
| Usage: just add <div class="gist">[gist URL]</div> | |
| Example: <div class="gist">https://gist.github.com/1395926</div> | |
| --> |
| /* http://twitter.github.com/bootstrap/scaffolding.html#responsive */ | |
| /* Landscape phones and down */ | |
| @media (max-width: 480px) { ... } | |
| /* Landscape phone to portrait tablet */ | |
| @media (max-width: 768px) { ... } | |
| /* Portrait tablet to landscape and desktop */ | |
| @media (min-width: 768px) and (max-width: 940px) { ... } |
| var parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |
| <?php | |
| require_once 'ControllerTestCase.php'; | |
| class AccountControllerTest extends ControllerTestCase | |
| { | |
| public function testSignupWithNoDataRedirectsAndHasErrors() | |
| { | |
| $response = $this->post('account@signup', array()); |
| <!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 { |