Skip to content

Instantly share code, notes, and snippets.

@deep75
deep75 / ecosystem.config.js
Created August 21, 2018 16:04
PM2 deploy tool’s purpose is to automate this task
module.exports = {
apps: [{
name: "app",
script: "app.js"
}],
deploy: {
// "production" is the environment name
production: {
// SSH key path, default to $HOME/.ssh
key: "/path/to/some.pem",
@deep75
deep75 / setup-label-docker.sh
Created August 21, 2018 15:52
Add label metadata to a node
#!/bin/sh
# label node with ARMv7 32 bits
docker node update --label-add foo --label-add os=linux-arm <worker-arm>
# label node with ARMv8 64 Bits
docker node update --label-add foo --label-add os=linux-arm64 <worker-arm64>
@deep75
deep75 / setup-docker.sh
Created August 21, 2018 15:48
Setup Docker
#!/bin/sh
set -e
# This script is meant for quick & easy install via:
curl -fsSL get.docker.com -o get-docker.sh
sh get-docker.sh
#
# For test builds (ie. release candidates):
# $ curl -fsSL test.docker.com -o test-docker.sh
# $ sh test-docker.sh
@deep75
deep75 / defaults.yaml
Created August 21, 2018 15:41
Using HTTPS with reverse-proxy.js
# reverse-proxy --port 80 --target 192.168.0.1:3000 --config ~/defaults.yaml
port: 443
target: 192.168.43.4:80
ssl:
cert: "/path/to/ssl/cert.file"
key: "/path/to/ssl/key.file"
@deep75
deep75 / micro_eddystone_beacon.c
Created August 21, 2018 15:30
Code for Eddystone URL
/*********************************************************************
* INCLUDES
*/
#include <string.h>
#include <stdlib.h>
#include <ti/sysbios/BIOS.h>
#include <ti/sysbios/knl/Task.h>
#include <ti/sysbios/knl/Clock.h>
#include <ti/sysbios/knl/Event.h>
@deep75
deep75 / mos.yml
Created August 21, 2018 15:24
chatbot-setup-web
author: karim
description: Setup Chatbot FC on ESP32
version: 1.0
libs_version: ${mos.version}
modules_version: ${mos.version}
mongoose_os_version: ${mos.version}
filesystem:
- fs