View stackup.sh
#!/bin/sh
export STACK_NAME='test'
mkdir -p ~/data/${STACK_NAME}/redis
STACK_NAME=${STACK_NAME} docker stack deploy --compose-file sample-stack.yml ${STACK_NAME}
View stackdn.sh
#!/bin/sh
export STACK_NAME='test'
docker stack rm ${STACK_NAME}
View sample-stack.yml
version: "3.4"
networks:
servicenet:
driver: overlay
ipam:
config:
-
subnet: 10.0.9.0/24
View eKatana.c
#include <Arduino.h>
#include "Adafruit_BLE.h"
#include "Adafruit_BluefruitLE_SPI.h"
#include "Adafruit_BluefruitLE_UART.h"
#include <Adafruit_LSM9DS0.h>
#include <Adafruit_Simple_AHRS.h>
#include "BluefruitConfig.h"
Adafruit_BluefruitLE_SPI ble(BLUEFRUIT_SPI_CS, BLUEFRUIT_SPI_IRQ, BLUEFRUIT_SPI_RST);
View .docker_aliases
#!/bin/sh
alias dm='docker-machine'
alias dmx='docker-machine ssh'
alias dk='docker'
alias dki='docker images'
alias dks='docker service'
alias dkrm='docker rm'
alias dkl='docker logs'
alias dklf='docker logs -f'
View test-stack.yml
version: "3.4"
networks:
servicenet:
driver: overlay
ipam:
config:
-
subnet: 10.0.9.0/24
View launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/electron/main.js",
"stopOnEntry": false,
"args": [],
View buildFixup.js
const fs = require('fs');
const path = require('path');
const packageJson = require('./package.json');
let filePath = path.join(__dirname, '/build/index.html');
let html = fs.readFileSync(filePath, 'utf8');
html = html.replace('<head>', `<head><base href="${packageJson.homepage}">`);
fs.writeFileSync('build/index.html', html);
View preact.config.js
export default (config, env, helpers) => {
config.target = 'electron-renderer';
if (env.production) {
config.output.publicPath = env.pkg.homepage;
let {plugin} = helpers.getPluginsByName(config, 'DefinePlugin')[0];
plugin.definitions['PUBLIC_PATH'] = env.pkg.homepage;
}
};
View main.js
const startUrl = process.env.ELECTRON_START_URL || url.format({
pathname: path.join(__dirname, '/../build/index.html'),
protocol: 'file:',
slashes: true
});
win.loadURL(startUrl);