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
// Core | |
const functions = require('firebase-functions'); | |
const admin = require('firebase-admin'); | |
admin.initializeApp(functions.config().firebase); | |
const db = admin.database(); | |
admin.auth().createUser({ | |
uid: uid, | |
displayName: displayName, | |
photoURL: photoURL |
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
{ | |
:alpha => "WILL L", # user.rest_alpha ? | |
:name => "Lynne Williams", # user.first_name, user.last_name | |
:leasename => "Lynne Williams", # ??? | |
:leaseshortname => "Lynne Williams", # ??? | |
:postalline1 => "27B Fisher Avenue", # user.address_line_one | |
:postalline3 => "Southport Qld 4215", # user.address_line_two | |
:tenantsuburb => "Southport", # user.suburb | |
:tenantstate => "Qld", # user.state | |
:tenantpcode => 4215, # user.postcode |
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
// First install the browser policy package: | |
// meteor add browser-policy | |
BrowserPolicy.framing.disallow(); | |
BrowserPolicy.content.disallowInlineScripts(); | |
BrowserPolicy.content.disallowEval(); | |
BrowserPolicy.content.allowInlineStyles(); | |
BrowserPolicy.content.allowFontDataUrl(); | |
// Change these to whatever services your app needs access to |
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
server { | |
# Internet traffic will come in on port 80 | |
listen 80; | |
# Apply only to traffic heading to example.com | |
# NOTE: change to your domain name | |
server_name example.come; | |
# When things are going wrong we can check the logs | |
access_log /var/log/nginx/app.dev.access.log; |
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
a - all | |
t - top | |
b - bottom | |
l - left | |
r - right | |
x - left and right | |
y - top and bottom | |
m-t = margin-top: 1em | |
m-t-md = margin-top: 1.5em |
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
// Usage: | |
// | |
// var video = videojs('video_id'); | |
// video.iframeSeek(); | |
// | |
// To start the player at 30s | |
// $iframe[0].contentWindow.postMessage('startTime:30', '*') | |
// | |
(function(window, videojs) { |
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
// see http://docs.meteor.com/#/full/meteor_error | |
var error = new Meteor.Error('error-name', 'reason'); | |
alert(error) //=> Error: reason [error-name] | |
alert(error.reason) //=> reason | |
alert(error.error) //=> error-name | |
// Explanation.. alert(error) is the same as going alert(error.toString()), which results in "Error: error.reason [error.error]" |
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
array = [1,2,3,4] | |
_.each array, (item) -> | |
console.log item | |
# OR | |
_(array).each (item) -> | |
console.log item | |
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
if Meteor.isServer | |
class @TestJob extends Job | |
@setupCron: (parser) -> | |
parser.text('every 5 seconds') | |
handleJob: -> | |
console.log 'Job complete' |
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
if Meteor.isClient | |
Template.hello.events | |
'click button': -> | |
Meteor.call('loadJob') | |
if Meteor.isServer | |
class @TestJob extends Job | |
handleJob: -> | |
console.log 'Job complete' |