This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Takes a Sails Model object (e.g. User) and a ValidationError object and translates it into a friendly | |
| * object for sending via JSON to client-side frameworks. | |
| * | |
| * To use add a new object on your model describing what validation errors should be translated: | |
| * | |
| * module.exports = { | |
| * attributes: { | |
| * name: { | |
| * type: 'string', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = { | |
| /** | |
| * | |
| * Using raw socket.io functionality from a Sails.js controller | |
| * | |
| */ | |
| index: function (req,res) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <select name="timezone" > | |
| <option disabled selected style='display:none;'>Time Zone...</option> | |
| <optgroup label="US (Common)"> | |
| <option value="America/Puerto_Rico">Puerto Rico (Atlantic)</option> | |
| <option value="America/New_York">New York (Eastern)</option> | |
| <option value="America/Chicago">Chicago (Central)</option> | |
| <option value="America/Denver">Denver (Mountain)</option> | |
| <option value="America/Phoenix">Phoenix (MST)</option> | |
| <option value="America/Los_Angeles">Los Angeles (Pacific)</option> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Controller_User extends Controller_Rest | |
| { | |
| protected function validateHash() | |
| { | |
| $request = file_get_contents('php://input'); | |
| $requestHeaders = apache_request_headers(); | |
| if (!isset($requestHeaders['X-Auth']) || !isset($requestHeaders['X-Auth-Hash'])) { | |
| $this->response('fail!',401); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| These are some helpful Git resources that I found while climbing the learning curve. | |
| Feel free to append / modify | |
| ======================= | |
| == UNDERSTANDING GIT == | |
| ======================= | |
| * The Git Parable | |
| - http://tom.preston-werner.com/2009/05/19/the-git-parable.html | |
| - "Read this parable all the way through and you should have very little trouble mastering the various Git commands and wielding the awesome power that Git makes available to you." |
Launch the instance and connect with ssh.
##Update the server
sudo yum update
##Install php and MySQL packages