Skip to content

Instantly share code, notes, and snippets.

View satour's full-sized avatar
💭
I may be slow to respond.

Satoru Ishikawa satour

💭
I may be slow to respond.
View GitHub Profile
use Rack::Static,
:urls => ["/images", "/js", "/css"],
:root => "public"
run lambda { |env|
[
200,
{
'Content-Type' => 'text/html',
'Cache-Control' => 'public, max-age=86400'
require 'csv'
label = [ "timestamp",
"gender",
"glasses",
"age",
"visit",
"anger",
"contempt",
"disgust",
package main
import (
"fmt"
"math/rand"
"net/http"
"time"
)
func main() {
package main
import (
"fmt"
"math/rand"
"net/http"
"time"
)
func main() {
package main
import (
"fmt"
"math/rand"
"time"
)
func main() {
daikichi_derumade_omikuji()
@satour
satour / omikuji.go
Last active January 28, 2018 07:01
package main
import (
"fmt"
"math/rand"
"time"
)
func main() {
rand.Seed(time.Now().UnixNano())
#!/bin/bash
# bootstrap script for OpenBlocks VX1(Linux obsiot.example.org 4.4.43 #1 SMP PREEMPT Thu Jun 1 17:12:21 JST 2017 x86_64 GNU/Linux)
# https://github.com/enebular/enebular-agent-aws-iot v1.0.1
# Node.js v0.10.29 (OpenBlocks PreInstalled Version)
apt-get install -y build-essential
apt install unzip
cd ~ && mkdir enebular && cd enebular
mkdir certs
wget https://raw.githubusercontent.com/satour/enebular-agent-aws-iot/master/example/config.json
npm init
<html lang="ja">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.css">
<style>
input[disabled] {
background-color: #EFEFEF;
border-color: #EFEFEF;
}
<html lang="ja">
<head>
<meta charset="utf-8">
<title>Ramen Timer</title>
<meta name="author" content="Satoru">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.css">
<style>
.container {
[{"id":"597cfabd.7a21e4","type":"debug","z":"d38ef6bc.bf8c48","name":"","active":true,"console":"false","complete":"true","x":370,"y":100,"wires":[]},{"id":"274f21b5.a9101e","type":"http in","z":"d38ef6bc.bf8c48","name":"","url":"/api1","method":"get","swaggerDoc":"","x":80,"y":60,"wires":[["16d1195.4d800e7"]]},{"id":"16d1195.4d800e7","type":"template","z":"d38ef6bc.bf8c48","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"enebular からEC2にデプロイされたHTTPエンドポイントです","x":210,"y":60,"wires":[["65fec4e4.ca741c","597cfabd.7a21e4"]]},{"id":"65fec4e4.ca741c","type":"http response","z":"d38ef6bc.bf8c48","name":"","x":370,"y":60,"wires":[]},{"id":"fae4d24f.a6651","type":"debug","z":"d38ef6bc.bf8c48","name":"","active":true,"console":"false","complete":"true","x":370,"y":200,"wires":[]},{"id":"c9144ad6.e03418","type":"http in","z":"d38ef6bc.bf8c48","name":"","url":"/api2","method":"get","swaggerDoc":"","x":80,"y":160,"wires":[["bff2b9dc.b151d8"]]},{"id":"bff2b9dc.b151d8","typ