Skip to content

Instantly share code, notes, and snippets.

@kaishuu0123
kaishuu0123 / rspec_middleware_test.rb
Created January 15, 2015 00:04
rspec middleware test
module MiddlewareExampleGroup
def self.included(base)
base.class_eval do
let(:app) {
Rack::Builder.new do
eval File.read(Rails.root.join('config.ru'))
end
}
end
end
$(document).ready(function() {
$("#graph_button").click(function () {
var img = document.getElementById("graph_img");
g = graph_data[999]
Dygraph.Export.asPNG(g, img);
console.log(img);
window.location.href = img.src; //.replace('image/png','image/octet-stream');
});
});
@kaishuu0123
kaishuu0123 / gist:7838949
Last active May 1, 2018 06:03
mruby-readline つくってみた

mruby advent calendar 2013 ネタです。

コードは github においてあります。

はじめまして、mruby にコミットしてたり(最近はできてない)、
mruby gem を作っていたりする kaishuu0123 です。
なにげに Advent calendar 初参加。ヽ|・ω・|ゞ

@kaishuu0123
kaishuu0123 / gist:7082398
Created October 21, 2013 11:31
NetBSD の IPv4 の median filter を読む
median
@kaishuu0123
kaishuu0123 / gist:6684551
Created September 24, 2013 13:16
qemu boot memo
$ make allnoconfig
$ make menuconfig
enable 8250 serial driver
enable ELF format
enable initrd
$ make
$ qemu -nographic -kernel ~/work/linux-3.11/arch/x86/boot/bzImage -initrd ~/work/helloworld.initramfs -append "initcall_debug console=ttyS0 earlyprintk=serial,keep debug"
@kaishuu0123
kaishuu0123 / .vimrc
Last active December 23, 2015 09:59
set nocompatible
filetype off
" init Vundle
set rtp+=~/.vim/vundle.git/
call vundle#rc()
Bundle 'gmarik/vundle'
Bundle 'thinca/vim-quickrun'
@kaishuu0123
kaishuu0123 / xv6.md
Last active April 23, 2022 15:56
xv6 を読む