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 / view.pl
Created August 16, 2011 14:10
表示してる部分。かなり手抜き。
use strict;
use warnings;
use DBIx::Simple;
use CGI;
use DateTime::Format::SQLite;
use DateTime;
use Text::Xslate qw(mark_raw);
my $q = CGI->new;
print $q->header(-charset=>'utf-8');
@y-yu
y-yu / view.html
Created August 16, 2011 14:13
表示してる部分のテンプレート。かなり手抜きだけど、Xslateは神。
<html lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Data <: $today :></title>
<style type="text/css">
td {
font-size: small;
border: 1px #2b2b2b solid;
@y-yu
y-yu / 21f.c
Created January 11, 2012 02:21
あるでぃーの
int spk = 13;
//int doremi[] = {523, 587, 659, 698, 784, 880, 988, 1046};
int doremi[] = {478, 506, 568, 638, 716, 758, 851, 956};
int button[8];
void setup() {
button_init();
pinMode(spk, OUTPUT);
}
@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;
@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 / 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 / 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 / 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 / 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 / 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,