Skip to content

Instantly share code, notes, and snippets.

View zigen's full-sized avatar
🏠
Working from home

Kentaro "zigen" Teramoto zigen

🏠
Working from home
View GitHub Profile
@zigen
zigen / game.rb
Created June 26, 2015 16:28
Level2
class Tic
X = "x"
O = "o"
def initialize
puts "Initialized"
@board = [
"-","-","-",
"-","-","-",
"-","-","-",
@zigen
zigen / game.rb
Created June 26, 2015 14:19
tic tac toe
class Tic
X = "x"
O = "o"
def initialize
puts "Initialized"
@board = [
"-","-","-",
"-","-","-",
"-","-","-",
]
@zigen
zigen / gist:a11ac44d82846070e0c0
Created May 1, 2015 12:36
arduinoとシリアル通信
import processing.serial.*;
boolean isEmit = false;
Serial arduino;
void setup() {
println(Serial.list());
arduino = new Serial(this, Serial.list()[5], 9600);
arduino.write(0);
}
void draw() {
void setup() {
// put your setup code here, to run once:
pinMode(13,OUTPUT);
Serial.begin(9600);
}
int i=0;
float b = pow(2.0,0.833333);
float freq = 440.0;
int scale[7] = {0,2,3,5,7,8,10};
#include <stdio.h>
#include <stdlib.h>
struct Cell {
struct Cell *next;
int value;
} ;
struct Cell* head;
void free_all();
@zigen
zigen / update0214.log
Last active August 29, 2015 14:15
FirefoxOSの起動画面で止まっています。とりあえずdmesgしてみました
Terminal ready
shell@android:/ # dmesg
<6>[ 0.000000] Initializing cgroup subsys cpu
<5>[ 0.000000] Linux version 3.0.36+ (fun@fxos) (gcc version 4.6.x-google 20120106 (prerelease) (GCC) ) #1 SMP PREEMPT Sat Feb 14 14:02:58 JST 2015
<4>[ 0.000000] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=10c5387d
<4>[ 0.000000] CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
<4>[ 0.000000] Machine: RK30board
<4>[ 0.000000] Ignoring unrecognised tag 0x00000000