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
<h1>Hello, {{ titlecase(name) }}</h1> |
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
export default function(Handlebars) { | |
Handlebars.registerHelper('titlecase', (string) => { | |
if (!string) return string; | |
return string[0].toUpperCase() + string.slice(1); | |
}); | |
} |
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
var rollup = require('rollup'); | |
var handlebars = require('rollup-plugin-handlebars-plus'); | |
var nodeResolve = require('rollup-plugin-node-resolve'); | |
// This can be whatever as long as it's consistent below. | |
var jqueryModuleId = 'jquery'; | |
rollup({ | |
entry: 'main.js', | |
external: [jqueryModuleId], |
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
#!/bin/bash | |
# | |
# This script will convert a Meteor application into a Node.js application | |
# then deploy it to AWS Elastic Beanstalk. | |
# | |
# Run like `deploy_aws.sh my_eb_app my_eb_app-production`. | |
# | |
# That will deploy the Meteor application containing this script | |
# to the `my_eb_app-production` environment of the `my_eb_app` EB application. |
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
files: | |
"/opt/elasticbeanstalk/hooks/appdeploy/pre/55npm_install.sh": | |
mode: "000755" | |
owner: root | |
group: root | |
content: | | |
#!/usr/bin/env bash | |
# Custom npm install to work with Meteor/s build command | |
export USER=root | |
export HOME=/tmp |
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
container_commands: | |
enable_websockets: | |
command: | | |
sed -i '/\s*proxy_set_header\s*Connection/c \ | |
proxy_set_header Upgrade $http_upgrade;\ | |
proxy_set_header Connection "upgrade";\ | |
' /tmp/deployment/config/#etc#nginx#conf.d#00_elastic_beanstalk_proxy.conf |
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
files: | |
"/opt/elasticbeanstalk/#etc#nginx#optimized-nginx.conf": | |
mode: "000644" | |
owner: root | |
group: root | |
encoding: plain | |
content: | | |
# Elastic Beanstalk Managed | |
# Elastic Beanstalk managed configuration file |
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
function connect() { | |
// Since we'd have sticky HTTP sessions, this will always go to the same instance, | |
// thus the websocket will connect to the same instance, assuming it's still living. | |
$.get('/websocket') | |
.then(function(ipAddress) { | |
Websocket.connect(ipAddress); | |
}); | |
} | |
Websocket.on('disconnection', connect); |
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
[alias] | |
# Run `git cleanup` when your PR(s) have been merged, after checking out master and pulling. | |
# It will find all the merged (local) branches and delete them for you. | |
cleanup = "!git branch --merged | perl -ne 'print if not /\\* master/' | xargs git branch -d" |
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
// Local variables will not escape the preload script. | |
var shell = require('electron').shell; | |
// Global variables _will_ escape the preload script, except for globals injected by Node, | |
// like `require`—-those will be deleted after the script is done executing. | |
Electron = { | |
openExternal: function(url) { | |
shell.openExternal(url); | |
} | |
// Notice we don’t save `shell` as a property of `Electron`! Then it’d be available |