This file contains 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
# This little gist shows how to easily internationalize your application using the meteor-just-i18n package. | |
# Package repository: https://github.com/subhog/meteor-just-i18n/ | |
# 1. Adding the package. | |
$ meteor add anti:i18n |
This file contains 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
# SYNTAX: | |
var pattern = new RegExp(pattern, attributes); # attributes: g (global); i (case-sensitive); m (multiline matches) | |
var pattern = /pattern/attributes; # same as above | |
# BRACKETS: | |
[...]: Any one character between the brackets. | |
[^...]: Any one character not between the brackets. |
This file contains 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
# This gist illustrates how to create and execute a payment with Paypal using their REST API. | |
# For additional informations, check the documentation: https://developer.paypal.com/docs/api/ | |
# Note 1: I assume that you have already created a developer account for Paypal and an application. | |
# To test that your code is working, use the sandbox accounts. | |
# https://developer.paypal.com/webapps/developer/applications/accounts | |
# Note 2: we will not use the Paypal REST API SDK package for Node.js | |
# https://github.com/paypal/rest-api-sdk-nodejs |
This file contains 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
<!-- | |
The examples below illustrate different ways to make a reactive and nonreactive join between two collections. | |
We will retrieve in all of them a list of the 10 most popular posts along with their author profile. | |
More informations are available on: http://journal.gentlenode.com/ | |
Summary: | |
1. Nonreactive Join #1: Denormalization. | |
2. Reactive Join #1: Joining on the client. (by calling a publication) | |
3. Reactive Join #2: Overpublishing. (and joining with data context) |
This file contains 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
# Atom Cheatsheet. | |
# Project Key Bindings. | |
- 'cmd-shift-p': open the command palette. | |
- 'cmd-p' or 'cmd-t': open the fuzzy finder to find a file. | |
- 'cmd-b': look for a file that is already open. | |
- 'cmd-shift-b': search the list of files modified and untracked in your project repository. | |
- 'ctrl-0': open and focus the the tree view. |
This file contains 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
// PhantomJS Cheatsheet | |
$ brew update && brew install phantomjs // install PhantomJS with brew | |
phantom.exit(); | |
var page = require('webpage').create(); | |
page.open('http://example.com', function() {}); | |
page.evaluate(function() { return document.title; }); |
This file contains 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
# METEOR CORE: | |
Anywhere: Meteor.isClient | |
Anywhere: Meteor.isServer | |
Anywhere: Meteor.startup(func) | |
Anywhere: Meteor.absoluteUrl([path], [options]) | |
Anywhere: Meteor.settings | |
Anywhere: Meteor.release | |
This file contains 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
# add the email package | |
meteor add email |
This file contains 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
<template name="ForgotPassword"> | |
<form action="/forgot" id="forgotPasswordForm" method="post"> | |
<input id="forgotPasswordEmail" type="text" name="email" placeholder="Email Address"> | |
<input class="btn-submit" type="submit" value="Send"> | |
</form> | |
<!-- end #forgot-password-form --> | |
</template> |
This file contains 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
<template name="SignOut"> | |
<div class="connected"> | |
<span class="welcome">Welcome New Meteorite!</span> | |
<a class="sign-out" href="/" id="signOut">Sign Out</a> | |
</div> | |
<!-- end .connected --> | |
</template> |