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
| 'use strict'; | |
| var container = require('../container'); | |
| var Twilio = container.get('Twilio'); | |
| var ReceptionService = container.get('ReceptionService'); | |
| var StreamModel = container.get('StreamModel'); | |
| var User = container.get('User'); | |
| var SocketIO = container.get('SocketIO'); |
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
| VAGRANTFILE_API_VERSION = "2" | |
| name = "tracker" | |
| memory = "256" | |
| cpu="2" | |
| type="nfs" # "", "nfs" | |
| ip = "192.168.10.20" | |
| home = "/home/vagrant/project" | |
| sync= "." |
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
| var http = require('http'); | |
| var fs = require('fs'); | |
| var img = fs.readFileSync('1x1.gif'); | |
| var server = http.createServer(function (req, res) { | |
| res.writeHead(200, {'Content-Type': 'image/gif' }); | |
| res.end(img, 'binary'); | |
| }); | |
| var port = 3000; |
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
| var url = "http://connect.bookt.com/ws/?apikey=" + key + "&method=" + method + "&entity=" + entity; | |
| var moment = require('moment'); | |
| var request = require('request'); | |
| request({url: url}, function (error, response, body) { | |
| console.log('>> booking',body); | |
| var date = new Date(); | |
| var checkIn = moment(date).add(2, 'weeks'); |
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
| #!/usr/bin/env bash | |
| update-docker-host(){ | |
| # clear existing docker.local entry from /etc/hosts | |
| sudo sed -i '' '/[[:space:]]docker\.local$/d' /etc/hosts | |
| # get ip of running machine | |
| export DOCKER_IP="$(echo ${DOCKER_HOST} | grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}')" |
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
| version: 0.1 | |
| phases: | |
| install: | |
| commands: | |
| - npm install yarn serverless -g | |
| - yarn install --production | |
| build: | |
| commands: | |
| - serverless deploy |
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
| #!/bin/bash | |
| ### ./glr.sh [APP] [TOKEN] | |
| NAME=$1 | |
| TOKEN=$2 | |
| DIR="gitlab-runner-$NAME" | |
| PWD=$(pwd) |
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
| const { Debug } = require('dataflow'); | |
| const debug = Debug('dataflow:debug:dedupe:worker'); | |
| const debugIdentity = debug.child('identity'); | |
| const { groupBy, flattenDeep } = require('lodash'); | |
| const { | |
| EntityId, Entity, Indexer, IdentityCollection, IndexEntity, |
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
| echo 'Install...' | |
| apt-get update && apt-get install -y apt-transport-https curl | |
| curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - | |
| cat <<EOF | tee /etc/apt/sources.list.d/kubernetes.list | |
| deb https://apt.kubernetes.io/ kubernetes-xenial main | |
| EOF | |
| echo 'Install k8s...' |
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
| curl -fsSL https://get.docker.com | sudo sh | |
| sudo usermod -aG docker $USER | |
| sudo curl -L "https://github.com/docker/compose/releases/download/1.25.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
| sudo chmod +x /usr/local/bin/docker-compose |
OlderNewer