Skip to content

Instantly share code, notes, and snippets.

//
// test_dragg_op.pde
//
import java.util.*;
class Node {
float x, y, w, h;
color fill_color;
String label;
boolean selected = false;
#!/usr/bin/ruby
require 'mathn'
$host = 'mqtt.example.com'
$port = 1883
$user = 'username'
$pass = 'password'
def usage
//
// pseudo_metaball_in_motion.pde - drawing test of pseudo metaball in motion
//
void setup() {
size(512, 512);
background(0);
}
void draw_pseudo_metaball(float x, float y, float r) {
//
// ascii table for 7segduino
//
// github:
// https://gist.github.com/yoggy/0365b24d193f9999c83e
//
// license:
// Copyright (c) 2015 yoggy <[email protected]>
// Released under the MIT license
// http://opensource.org/licenses/mit-license.php
@yoggy
yoggy / chattr_sample.txt
Created April 23, 2015 12:30
chattr +iって、たまに設定されてると忘れていて焦るよね…
$ touch hoge
$ ls -al hoge
-rw-rw-r-- 1 yoggy yoggy 0 Apr 23 21:27 hoge
$ lsattr hoge
-------------e-- hoge
$ sudo chattr +i hoge
#define V_ON 40
#define V_OFF 300
#define V_INTERVAL 1500
#define V_COUNT 7
#define V_SLEEP 180
void setup( ) {
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
}
@yoggy
yoggy / caps2ctrl.reg
Created February 28, 2015 11:31
CapsキーをCtrlキーに割り当てるレジストリー設定
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00
@yoggy
yoggy / surfacepro3-keyboard-jp-settings.reg
Created February 28, 2015 08:46
Surface Pro 3でソフトウェアキーボードで日本語キーボードが表示されないのを修正するregファイル
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\i8042prt\Parameters]
"LayerDriver JPN"="kbd106.dll"
"OverrideKeyboardType"=dword:00000007
"OverrideKeyboardIdentifier"="PCAT_106KEY"
"OverrideKeyboardSubtype"=dword:00000002
//
// serial_sseg.ino - serial display control sketch for 7segduino
//
// github:
// https://gist.github.com/yoggy/80e47ff0932f3900c77f
//
// license:
// Copyright (c) 2015 yoggy <[email protected]>
// Released under the MIT license
// http://opensource.org/licenses/mit-license.php