$ ruby -v
ruby 2.3.1p112 (2016-04-26) [i386-linux-gnu]
$ gem install mqtt
$ gem list | grep mqtt
mqtt (0.4.0)
This file contains hidden or 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
// | |
// AndroidでBluetoothをON/OFF制御するサンプルコード | |
// | |
// BluetoothのON/OFFを制御する場合は、AndroidManifestに以下のPermissionが必要 | |
// <uses-permission android:name="android.permission.BLUETOOTH" /> | |
// <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /> | |
// | |
// license: | |
// Copyright (c) 2016 yoggy <[email protected]> | |
// Released under the MIT license |
This file contains hidden or 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
// | |
// 交流位相.pde | |
// | |
// 交流を流したときの電流の位相をアニメーションで簡易表示するスケッチ | |
// | |
float th = 0.0; | |
boolean enable = true; | |
void setup() { | |
size(600, 300); |
This file contains hidden or 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
#include <Keyboard.h> | |
int pin_button = 8; | |
int count = 0; | |
bool is_push_button = false; | |
void setup() { | |
pinMode(pin_button, INPUT_PULLUP); | |
Serial.begin(9600); | |
Keyboard.begin(); |
epipphan AV.io
FEBON 198
This file contains hidden or 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
size(1024, 500); | |
background(#ffffff); | |
colorMode(HSB); | |
for (int i = 0; i < 50; ++i) { | |
int h = (int)random(-60, 80); | |
int s = (int)random(100, 255); |
This file contains hidden or 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
// | |
// mqtt_mhz19_pub.ino - test program for esp-wroom-02 & mh-z19 | |
// | |
// ESP-WROOM-02 development board | |
// https://www.switch-science.com/catalog/2500/ | |
// | |
// MH-Z19 | |
// http://www.winsen-sensor.com/products/ndir-co2-sensor/mh-z19.html | |
// | |
// License: |
This file contains hidden or 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
// | |
// test program for esp-wroom-02 & mh-z19 | |
// | |
// ESP-WROOM-02 development board | |
// https://www.switch-science.com/catalog/2500/ | |
// | |
// MH-Z19 | |
// http://www.winsen-sensor.com/products/ndir-co2-sensor/mh-z19.html | |
// | |
// License: |
This file contains hidden or 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/ruby | |
# | |
# passgen.rb - pseudo password generator | |
# | |
# How to use: | |
# $ echo login.password.google.com | ./passgen.rb | |
# | |
# License: | |
# Copyright (c) 2018 yoggy <[email protected]> | |
# Released under the MIT license |