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
--- i18n_ja_jp_filter.c.orig 2000-04-04 09:18:32.000000000 +0900 | |
+++ i18n_ja_jp_filter.c 2014-04-08 18:07:28.723051000 +0900 | |
@@ -97,5392 +97,7 @@ | |
/* unicode support by */ | |
#define UNDEFCHAR_JIS 0x2126 | |
#define UNDEFCHAR_UNICODE 0x30FB | |
-extern const unsigned short u2jtable[]; | |
-extern const unsigned short j2utable[]; | |
-extern const int u2jtable_size; | |
-extern const int j2utable_size; |
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
diff --git Gemfile Gemfile | |
index a531c7c..2932ed2 100644 | |
--- Gemfile | |
+++ Gemfile | |
@@ -4,6 +4,11 @@ gem "sinatra" | |
gem "grape" | |
gem "slim" | |
gem "sass" | |
+gem "activerecord" | |
+gem "sinatra-activerecord" |
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
require "singleton" | |
require "sequel" | |
=begin | |
Overview: | |
Reconnect to DB module using Sequel | |
When `ping` success, `connection` return same connection. | |
In case of fail, reload `config/database.yml` and try new connect. | |
Require: | |
`../config/database.yml` (Deploy in `lib/` (or other dir) this file.) |
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 sensortag (require `libbluetooth-dev`) */ | |
var SensorTag = require('sensortag'); | |
var net = require('net'); | |
var myUUID = process.env["TI_UUID"] || "YOUR_TI_sensor_tag_UUID"; | |
console.log("start"); | |
console.log("waiting for connect from " + myUUID); | |
SensorTag.discover(function(sensorTag) { | |
console.log(">> STOP: Ctrl+C or SensorTag power off"); |
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
/* | |
* Example code of read sensor data of multiple SensorTag (CC2541DK-SENSOR, CC2650STK) at same time by using node-sensortag | |
* | |
* Node.js 0.10.36 or higher (4.4.2 ready) | |
* | |
* Usage; | |
* $ npm install sensortag async | |
* $ node multiple_sensortag.js | |
* | |
* e.g.) |
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
# Usage; | |
# | |
# Patlite.host = "192.168.254.209" | |
# red = Patlite.new(:red) | |
# p red.state? | |
# #=> :off / :on | |
# if red.off? | |
# red.on | |
# end |
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
# Receive desire from AWS IoT and send command to real-device (Commander) | |
# | |
# POINT: | |
# * Listen on /update/delta | |
# <when Received a delta...> | |
# 1. Parse the delta | |
# 2. Execute command according to content | |
# 3. Erase on 'desired' | |
# => Should be removed "desired" ASAP after parsing delta | |
# Remains "desired" is cause of trouble (e.g. Out of sync) |
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
# Report device status to AWS IoT (Reporter) | |
# | |
# POINT: | |
# 1. Delete exist shadow(status) for initialize [optional] | |
# 2. Fetch state of real-device | |
# 3. Formatting for submit to AWS IoT | |
# 4. Report to AWS IoT | |
# 2~4 <endless-loop> | |
require "timers" # NOTE: https://github.com/celluloid/timers |
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
require "./patlite" | |
Patlite.host = "192.168.254.209" | |
patlite = [] | |
[:red, :yellow, :green].each do |i| | |
patlite << Patlite.new(i) | |
end | |
loop do | |
a = patlite.sample |
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
<!-- | |
AWS IoT's Thing Shadow access w/ Websocket over MQTT and Cognito | |
--> | |
<script type="text/javascript" src="https://sdk.amazonaws.com/js/aws-sdk-2.3.9.min.js"></script> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.13.0/moment.min.js"></script> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/sha256.js"></script> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/hmac-sha256.js"></script> | |
<script type="text/javascript" src="https://cdn.rawgit.com/ma2shita/2c5a4c29242dd5382b05ce941731fd41/raw/eb4bc16c02e7a72bbd0086e937050c258da09a20/sigv4utils.js"></script> | |
<script type="text/javascript" src="https://cdn.rawgit.com/ma2shita/63fb1dfd07753dc1ff67fe98132c0bc0/raw/ef50f3ec3276dd1c5dd90a3003e5105045b837e2/mqttws31.js"></script> | |
<script> |
OlderNewer