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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from libcloud.compute.types import Provider | |
from libcloud.compute.providers import get_driver | |
from libcloud.compute.deployment import ScriptDeployment | |
from libcloud.compute.deployment import MultiStepDeployment | |
import os | |
import time |
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
$ ./deploy.py | |
start salt | |
end salt, eplapsed: 195.698220968 | |
start minion1 | |
end minion1, eplapsed: 180.300945044 | |
start minion2 | |
end minion2, eplapsed: 165.452461958 |
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
$ npm install -g cordova ionic | |
$ npm install -g ripple-emulator |
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
meshblu: | |
image: octoblu/meshblu:0c3e5bd | |
volumes: | |
- .:/var/www | |
- ./docker:/etc/supervisor/conf.d | |
- /opt/docker_apps/certs/meshblu:/opt/meshblu/certs | |
environment: | |
- PORT=80 | |
- MQTT_PORT=1883 | |
- MQTT_PASSWORD=skynetpass |
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/sh - | |
set -o nounset | |
# Docker | |
wget -qO- https://get.docker.com/ | sh | |
# Docker Compose | |
curl -L https://github.com/docker/compose/releases/download/1.2.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose; chmod +x /usr/local/bin/docker-compose | |
# SSL Certificate |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import paho.mqtt.client as mqtt | |
from time import sleep | |
import json | |
import sys | |
import bme280 | |
from config import conf | |
def sensing(): |
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
conf = { | |
"IDCF_CHANNEL_URL": "210-140-167-168.jp-east.compute.idcfcloud.com", | |
"TRIGGER_UUID": "9ca04922-88a3-404e-8709-f6a544763c35", | |
"TRIGGER_TOKEN": "89ad09fd", | |
"ACTION_UUID": "a1e99a5f-acb6-4210-87c4-d195ea3d9f69", | |
"FREEBOARD_UUID": "8eb3a4c0-5fb0-456c-9b90-44e59c40f5ad" | |
} |
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 md5cycle(x, k) { | |
var a = x[0], b = x[1], c = x[2], d = x[3]; | |
a = ff(a, b, c, d, k[0], 7, -680876936); | |
d = ff(d, a, b, c, k[1], 12, -389564586); | |
c = ff(c, d, a, b, k[2], 17, 606105819); | |
b = ff(b, c, d, a, k[3], 22, -1044525330); | |
a = ff(a, b, c, d, k[4], 7, -176418897); | |
d = ff(d, a, b, c, k[5], 12, 1200080426); | |
c = ff(c, d, a, b, k[6], 17, -1473231341); |
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
{"formatVersion":"1.0","tagData":{"name":"myThings","icon":"./res/x2/default_icon.png","description":"入力を受けてIDCFチャンネルのトリガーを発火します。","functions":[{"id":"function_0","name":"Trigger","connector":{"inputs":[{"label":""}],"outputs":[{"label":""}]},"properties":[{"name":"uuid","referenceName":"myTriggerUuid","type":"string","defaultValue":"60bd1824-xxxx-xxxx-xxxx-xxxxxxxxxxxx"},{"name":"token","referenceName":"myTriggerToken","type":"string","defaultValue":"1d6f9xxx"},{"name":"endpoint","referenceName":"myEndpoint","type":"string","defaultValue":"210.140.xxx.xxx"}],"extension":{"initialize":"","receive":"","execute":"var endPointURL = 'http://'+properties.myEndpoint + '/data/'+properties.myTriggerUuid;\n\n\najax ({\n url : endPointURL,\n type : 'post',\n data : 'from MESH',\n timeout : 5000,\n\theaders: {\n\t\t'meshblu_auth_uuid': properties.myTriggerUuid,\n\t\t'meshblu_auth_token': properties.myTriggerToken\n\t},\n success : function ( contents ) {\n\t\tlog('success');\n callbackSuccess( {\n |
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 | |
: ${SPARK_VERSION:=1.5.1} | |
: ${SPARK_DIST_PREFIX_VERSION:=2.6} | |
: ${SPARK_HADOOP_VERSION:=2.6.0} | |
SPARK_DIST_VERSION=$SPARK_VERSION-bin-hadoop$SPARK_DIST_PREFIX_VERSION | |
SPARK_ASSEMBLY_VERSION=$SPARK_VERSION-hadoop$SPARK_HADOOP_VERSION | |
set-spark-envs() { |
OlderNewer