Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
cd /home/ec2-user/ingest
./run.sh
aws --region=us-east-1 autoscaling terminate-instance-in-auto-scaling-group --instance-id $(curl http://169.254.169.254/latest/meta-data/instance-id) --should-decrement-desired-capacity
redisconfig_1 | _._
redisconfig_1 | _.-``__ ''-._
redisconfig_1 | _.-`` `. `_. ''-._ Redis 3.0.3 (00000000/0) 64 bit
redisconfig_1 | .-`` .-```. ```\/ _.,_ ''-._
redisconfig_1 | ( ' , .-` | `, ) Running in standalone mode
redisauth_1 | _._
redisconfig_1 | |`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
redisauth_1 | _.-``__ ''-._
redisconfig_1 | | `-._ `._ / _.-' | PID: 1
redisauth_1 | _.-`` `. `_. ''-._ Redis 3.0.3 (00000000/0) 64 bit
const express = require("express");
const userRouter = express.Router();
const groupRouter = express.Router();
const app = express();
userRouter.get("/user", (req, res) => res.end("user"));
groupRouter.get("/group", (req, res) => res.end("group"));
app.use("/api", userRouter);
app.use("/api", groupRouter);
angular.module('starter', ['ionic'])
.run(["LocationService", async LocationService => {
const coords = await LocationService.getPosition();
console.log(coords);
}])
.service("LocationService", ["$window", "$q", ($window, $q) => (
{
getPosition() {
const dfd = $q.defer();
function authenticateUser(details, callback) {
if (details) {
return callback.onSuccess();
}
return callback.onFailure();
}
new Promise((onSuccess, onFailure) => {
authenticateUser(true, {
onSuccess,
const Promise = require("bluebird");
const docClient = {
put(x, cb) {
setTimeout(() => {
if (1 == x) {
cb(null, "good");
}
else {
cb(new Error("bad"));
}
sns.createPlatformEndpointAsync({
PlatformApplicationArn: applicationArn,
Token: deviceId,
});
/* send the notification (not needed) */
sns.publishAsync({
MessageStructure: "json",
Message: JSON.stringify({
APNS: JSON.stringify({
BPromise.all(friendIdList.filter(Boolean).map(obsId => docClient.queryAsync(params)))
.then(feedList => _.sortBy(_.flatten(feedList), 'timestamp').reverse());
* Error running command 'PREFIX=acrites provision/subtf': exit status 1. Output: MANPATH=/Users/acrites/.nvm/versions/node/v6.3.1/share/man:/usr/share/man:/usr/local/share/man:/Library/Developer/[45/1215]
neTools/usr/share/man
TERM_PROGRAM=iTerm.app
AWS_HOME=/Users/acrites/.aws
NVM_CD_FLAGS=-q
SHELL=/bin/zsh
TERM=screen-256color
TMPDIR=/var/folders/cl/zx36gcds2yb4b2h6hc6djdz00000gp/T/
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.IF8k6j0KcI/Render
NVM_PATH=/Users/acrites/.nvm/versions/node/v6.3.1/lib/node
tfplanJˇôPlanˇöDiffˇúModuleˇ™Stateˇ¨VarsˇäTargetsˇàˇõDiffˇúModulesˇ®&ˇß[]*terraform.ModuleDiffˇ®ˇû1ˇùˇûPathˇà Resourcesˇ¶Destroyˇá[]stringˇà 3ˇ•"map[string]*terraform.InstanceDiffˇ¶ ˇ†;ˇüˇ†
Attributesˇ§DestroyDestroyTainted7ˇ£&map[string]*terraform.ResourceAttrDiffˇ§ ˇ¢oˇ°ˇ¢Old New  NewComputed
NewRemovedNewExtra RequiresNew SensitiveType
ˇ©ˇæ]ˇ´Stateˇ¨Version TFVersion SerialLineage RemoteˇÆModulesˇº.ˇ≠ RemoteStateˇÆType Configˇñ!ˇïmap[string]stringˇñ  'ˇª[]*terraform.ModuleStateˇºˇ∞DˇØˇ∞PathˇàOutputsˇ¥ Resourcesˇ∫ Dependenciesˇà2ˇ≥!map[string]*terraform.OutputStateˇ¥ ˇ≤-ˇ±ˇ≤ SensitiveType Value4ˇπ#map[string]*terraform.ResourceStateˇ∫ ˇ∂Nˇµˇ∂Type  DependenciesˇàPrimaryˇîDeposedˇ∏Provide