- The question of what "belongs" in a framework is complex, and depends on your use case. A better question is "what are the defaults?" By pulling all of the current features of Sails into plugins, and then including them by default, we provide full customizability (the possibility of disabling just about everything) without sacrificing all the conveniences Sails developers are used to.
- Plugins make it easier to contribute, and make modifying the core a much less scary proposition.
- Node.js is quite minimalist, and super awesome. Let's take a leaf out of Ryan/Isaac's book!
- Community plugins are fantastic, but to ensure quality, plugins will only be listed on the Sails website/repo when they've met some basic quality assurance testing.
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
| -Go to the starting point of the project | |
| >> git checkout origin master | |
| -fetch all objects | |
| >> git fetch origin | |
| -Make the branch from the tag | |
| >> git branch new_branch tag_name | |
| -Checkout the branch | |
| >> git checkout new_branch | |
| -Push the branch up | |
| >> git push origin new_branch |
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
| // EntryPoint.js | |
| define(function () { | |
| return function EntryPoint(model1, model2) { | |
| // stuff | |
| }; | |
| }); | |
| // Model1.js | |
| define(function () { | |
| return function Model1() { |
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
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Styling radios & checkboxes using CSS3</title> | |
| <link rel="stylesheet" media="screen" href="styles.css" > | |
| </head> | |
| <body> | |
| <h1>Styling radios & checkboxes using CSS3</h1> |
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
| # Change YOUR_TOKEN to your prerender token | |
| # Change http://example.com (at the end of the last RewriteRule) to your website url | |
| <IfModule mod_headers.c> | |
| RequestHeader set X-Prerender-Token "YOUR_TOKEN" | |
| </IfModule> | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On |
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
| window.ParsleyConfig = { | |
| errorClass: 'has-error', | |
| successClass: 'has-success', | |
| classHandler: function (ParsleyField) { | |
| return ParsleyField.$element.parents('.form-group'); | |
| }, | |
| errorsContainer: function (ParsleyField) { | |
| return ParsleyField.$element.parents('.form-group'); | |
| }, | |
| errorsWrapper: '<span class="help-block">', |
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
| #https://gorails.com/setup/ubuntu/14.04 | |
| sudo apt-get update | |
| sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties | |
| sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev | |
| curl -L https://get.rvm.io | bash -s stable | |
| source ~/.rvm/scripts/rvm | |
| echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc | |
| rvm install 2.1.2 | |
| rvm use 2.1.2 --default |
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 | |
| require_once(dirname(__FILE__) . '/config.php'); | |
| $token = $_POST['stripeToken']; | |
| $customer = Stripe_Customer::create(array( | |
| 'email' => '[email protected]', | |
| 'card' => $token | |
| 'plan' => 'fancy_plan_id' | |
| )); |
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
| // assertions/compareScreenshot.js | |
| var resemble = require('resemble'), | |
| fs = require('fs'); | |
| exports.assertion = function(filename, expected) { | |
| var screenshotPath = 'test/screenshots/', | |
| baselinePath = screenshotPath + 'baseline/' + filename, | |
| resultPath = screenshotPath + 'results/' + filename, | |
| diffPath = screenshotPath + 'diffs/' + filename; |
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
| // location: ./assertions/compareScreenshot.js | |
| var resemblejs = require('node-resemble-js'), | |
| fs = require('fs'); | |
| exports.assertion = function(filename, expected) { | |
| var screenshotPath = 'test/screenshots/', | |
| baselinePath = screenshotPath + 'baseline/' + filename, | |
| resultPath = screenshotPath + 'results/' + filename, | |
| diffPath = screenshotPath + 'diffs/' + filename; |
OlderNewer