Skip to content

Instantly share code, notes, and snippets.

void setup() {
size(600, 480);
}
void draw() {
float x = random(0, width);
float y = random(0, height);
float l = random(0, width / 5);
float r = random(0, 255);
package net.sabamiso.android.aestest;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Base64;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
@yoggy
yoggy / Privacy policy for Android application.md
Created March 6, 2017 07:09
Privacy policy for Android application

Privacy policy (for https://play.google.com/store)

This software is released under the MIT License. You can see the sourcecode in my github repository. Please see the source code about the handling of personal data.

Copyright and license

Copyright (c) 2017 yoggy

//
// 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

Example of ruby-mqtt does not work with mathn library

$ ruby -v
ruby 2.3.1p112 (2016-04-26) [i386-linux-gnu]

$ gem install mqtt
$ gem list | grep mqtt
mqtt (0.4.0)
@yoggy
yoggy / mqtt-test.md
Last active July 11, 2016 07:51
require 'mathn'するとruby-mqttが動かない例

require 'mathn'するとruby-mqttが動かない例

$ ruby -v
ruby 2.3.1p112 (2016-04-26) [i386-linux-gnu]

$ gem install mqtt
$ gem list | grep mqtt
mqtt (0.4.0)
@yoggy
yoggy / 交流位相.pde
Last active June 9, 2016 07:16
交流を流したときの電流の位相をアニメーションで簡易表示するスケッチ
//
// 交流位相.pde
//
// 交流を流したときの電流の位相をアニメーションで簡易表示するスケッチ
//
float th = 0.0;
boolean enable = true;
void setup() {
size(600, 300);
#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();
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);