Skip to content

Instantly share code, notes, and snippets.

View y-yu's full-sized avatar

YOSHIMURA Yuu y-yu

View GitHub Profile
@y-yu
y-yu / mozibake.js
Created June 7, 2012 02:17
文字化け
var $ = function ( selector, context ) {
context = context || document;
return context.querySelector(selector);
};
var enc = {
s : "Shift_JIS",
e : "EUC-JP",
u : "UTF-8",
i : "ISO-2022-JP"
}[location.hash.substr(1)];
@y-yu
y-yu / kana-rule.conf
Created May 15, 2012 06:43
kana-rule
a,あ,ア,ア
bb,っ,ッ,ッ,b
ba,ば,バ,バ
bi,び,ビ,ビ
bu,ぶ,ブ,ブ
be,べ,ベ,ベ
bo,ぼ,ボ,ボ
# DvorakJP
# コンビネーションキー
@y-yu
y-yu / 3.cpp
Created February 29, 2012 00:25
まとりっくす3
#include <Sprite.h>
#include <Matrix.h>
#include <TimerOne.h>
Matrix mtx = Martix(10, 12, 11);
Sprite tsuku = Sprite(
8, 7,
B01001000,
B01101110,
@y-yu
y-yu / matrix2.cpp
Created February 22, 2012 02:07
まとりっくす2
#include <Sprite.h>
#include <Matrix.h>
Matrix mtx = Matrix(10, 12, 11);
Sprite tsuku = Sprite(
B01001000,
B01101110,
B10110100,
B00000000,
@y-yu
y-yu / matrix.cpp
Created February 22, 2012 01:49
まとりっくす
#include <Matrix.h>
#include <Sprite.h>
Matrix mtx = Matrix(10, 12, 11); // DIN, CLK, LOAD の各ピン番号
void setup() {}
void loop() {
mtx.clear(); // LED マトリックスを全て消灯
@y-yu
y-yu / 2.c
Created February 13, 2012 01:24
プログラミング入門II 課題5演習2
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
struct record {
char word[20];
int count;
struct record *next;
};
@y-yu
y-yu / 3.cpp
Created February 1, 2012 00:23
あるでぃーの
int led[10];
void init_led () {
for (int i=0; i<10; i++) {
led[i] = i + 2;
pinMode(led[i], OUTPUT);
}
}
void light_led (char *num) {
@y-yu
y-yu / a.pl
Created January 25, 2012 02:09
あるでぃーの2
int led[10];
void init_led () {
for (int i=0; i<10; i++) {
led[i] = i + 2;
pinMode(led[i], OUTPUT);
}
}
void light_led (char *num) {
@y-yu
y-yu / 10.pl
Created January 19, 2012 13:51
しみゅれーしょん☆ぶつり 10
use 5.14.0;
my $G = 1;
my $H = 3.5;
my $M = 1;
my $org = 90;
my $dx = 0.5;
my $dt = 0.1;
my $nm = 99;
my $ni = 50;
@y-yu
y-yu / Stream.pm
Created January 17, 2012 16:49
AnyEvent::Twitter::Stream改変
package AnyEvent::Twitter::Stream;
use strict;
use 5.008_001;
our $VERSION = '0.21';
use Data::Dumper;
use AnyEvent;
use AnyEvent::HTTP;