Skip to content

Instantly share code, notes, and snippets.

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

Shin Fujisawa fnobi

🏠
Working from home
View GitHub Profile
@fnobi
fnobi / jsdoit.css
Created September 15, 2012 09:58
wachase
body{
background-color:white;
font:30px sans-serif;
margin:0px;padding:0px;
}
canvas{
display:block;
}
@fnobi
fnobi / README
Created September 21, 2012 07:01
ko-se-line
こうせいしえん。あとhtml5的なもののお試し。
@fnobi
fnobi / jsdoit.css
Created October 29, 2012 14:47
2012-10-25 1st
body { background-color: #DDDDDD; font: 30px sans-serif; }
#g-navi li{
display: inline;
}
@fnobi
fnobi / README
Created December 8, 2012 10:45
ちょっとかわいく震えるやつ
まぁ移動量をフェードさせればある程度はかわいくなるなぁというところまで。
※webkit(chrome, safari)対応しかしてません。
@fnobi
fnobi / perlでlexer
Created December 13, 2012 07:16
string周りとか不完全だけど。
use strict;
# コマンドライン引数を、sourcecodeとする
my $sourcecode = $ARGV[0];
my $char;
my $stack = "";
my @tokens = [];
# sourcecodeを一文字ずつ見る
@fnobi
fnobi / watchfile.js
Created January 2, 2013 17:33
fs.watchFileを使ってみた ref: http://qiita.com/items/b4588b2b37fe7136383d
var fs = require('fs');
var filepath = 'message.txt';
// filepathが存在しなくても、watchFileはエラーとか出してくれないので、
// 先にfs.existsで調べておく
if (!fs.existsSync(filepath)) {
console.error('%s doesn\'t exist.', filepath);
process.exit();
}
@fnobi
fnobi / Gemfile
Created February 6, 2013 09:55
RedmineをApacheのproxy_pass使って公開するまで ref: http://qiita.com/items/3bcdb59ab362923e640f
gem 'rails', '3.2.11'
gem "jquery-rails", "~> 2.0.2"
gem "i18n", "~> 0.6.0"
gem "coderay", "~> 1.0.6"
gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby]
gem "builder", "3.0.0"
gem "unicorn" # 追加
@fnobi
fnobi / .bashrc
Created February 11, 2013 15:40
terminalを棄ててEmacsと心中するための設定 ref: http://qiita.com/items/8906c8e7759751d32b6b
## create emacs env file
perl -wle \
'do { print qq/(setenv "$_" "$ENV{$_}")/ if exists $ENV{$_} } for @ARGV' \
PATH > ~/.emacs.d/shellenv.el
@fnobi
fnobi / Gruntfile.js
Created April 16, 2013 14:48
grunt-pluginの作り方と解剖 ref: http://qiita.com/items/5590e7e92b4f2bd81d04
var grant = require('grunt');
module.exports = function () {
grunt.initConfig({
sample: {
dev: { // 開発環境
hoge: 'hogehoge'
},
prod: { // 本番環境
hoge: 'moge'
@fnobi
fnobi / file0.txt
Created April 24, 2013 12:47
HTMLのカラーコードから、明度を出した話 ref: http://qiita.com/items/d3464ba0e4b6596863cb
var rgb = [128, 30, 200]; // R=128, G=30, B=200
// 0〜255の値が入っているので、255で割っておく
var blightness = Math.max(rgb[0], rgb[1], rgb[2]) / 255;