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
| /** | |
| * Assembles query parameters. | |
| * | |
| * @param {array} queries The query string component from the request. | |
| * @return {string} The query string joined using `&`. | |
| */ | |
| module.exports.assembleQuery = function (queries) { | |
| var query = []; | |
| for (var property in queries) { | |
| query.push(property + "=" + queries[property]); |
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
| 'use strict'; | |
| var helper = require('./lib/helper'); | |
| /** | |
| * Handles GET requests. | |
| */ | |
| module.exports.handler = (event, context, callback) => { | |
| // Prevent crashing due to uncallable callbacks. | |
| // See: http://justbuildsomething.com/node-js-best-practices/#5 | |
| callback = (typeof callback === 'function') ? callback : function() {}; | |
| var query = helper.assembleQuery(event.queryStringParameters); |
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
| --- | |
| AWSTemplateFormatVersion: '2010-09-09' | |
| Transform: AWS::Serverless-2016-10-31 | |
| Resources: | |
| GetFunction: | |
| Type: AWS::Serverless::Function | |
| Properties: | |
| Description: "Handles GET requests." | |
| Handler: get.handler | |
| Runtime: nodejs6.10 |
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
| AWSTemplateFormatVersion: '2010-09-09' | |
| Transform: AWS::Serverless-2016-10-31 | |
| Resources: | |
| MyLambdaFunction: | |
| Type: AWS::Lambda::Function | |
| . | |
| . | |
| . |
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
| AWSTemplateFormatVersion: '2010-09-09' | |
| Resources: | |
| MyLambdaFunction: | |
| Type: AWS::Lambda::Function | |
| . | |
| . | |
| . |
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
| version: '2' | |
| services: | |
| mariadb: | |
| env_file: | |
| - ./mariadb/dev/passwords.env | |
| # cat ./mariadb/dev/passwords.env | |
| MYSQL_ROOT_PASSWORD=root | |
| MYSQL_DATABASE=database_name_here |
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
| # sudo apt-get install make build-essential ccache g++ libgif-dev libjpeg62-dev libfreetype6-dev libpng12-dev libgif-dev | |
| # cd /tmp/alfrescoinstall | |
| # curl -# -O http://www.swftools.org/swftools-2013-04-09-1007.tar.gz | |
| # tar xf swftools*.tar.gz | |
| # cd "$(find . -type d -name "swftools*")" | |
| # ./configure | |
| # sudo make && sudo make install | |
| Installing build tools and libraries needed to compile swftools. Fetching packages... | |
| debconf: unable to initialize frontend: Dialog |
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
| [{"name":"Bears","color":"Blue","position":{"x":177,"y":85},"modelclass":"Bear","increment":false,"timestamp":false,"softdelete":false,"column":[{"colid":"c217","name":"id","type":"increments","length":"0","order":0,"defaultvalue":"","enumvalue":""},{"colid":"c218","name":"name","type":"string","length":"200","order":1,"defaultvalue":"","enumvalue":""},{"colid":"c219","name":"danger_level","type":"string","length":"200","order":2,"defaultvalue":"","enumvalue":""}],"relation":[{"extramethods":"","foreignkeys":"","name":"fish","relatedmodel":"Fish","relationtype":"hasOne","usenamespace":""},{"extramethods":"","foreignkeys":"","name":"trees","relatedmodel":"Trees","relationtype":"hasMany","usenamespace":""},{"extramethods":"","foreignkeys":"bear_id, picnic_id","name":"picnics","relatedmodel":"Picnics","relationtype":"belongsToMany","usenamespace":""}],"seeding":[]},{"name":"Fish","color":"Yellow","position":{"x":1063,"y":14},"modelclass":"Fish","increment":false,"timestamp":false,"softdelete":false,"column":[{"c |
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
| Model: | |
| <?php | |
| class ZipCodes extends \app\extensions\data\Model { | |
| protected $_meta = array( | |
| 'key' => 'zip_code_id', | |
| 'title' => 'state_name' | |
| ); | |
| protected $_schema = array( |
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 | |
| //extensions/data/Model.php | |
| public static function __init() { | |
| static::_isBase(__CLASS__, true); | |
| parent::__init(); | |
| //static::all(); //doesn't work | |
| #$self = static::_object(); |