Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View hokaccha's full-sized avatar

Kazuhito Hokamura hokaccha

View GitHub Profile
@hokaccha
hokaccha / .vimrc
Created April 27, 2010 09:19 — forked from Shougo/.vimrc
" Capture {{{
command!
\ -nargs=1
\ -complete=command
\ Capture
\ call Capture(<f-args>)
function! Capture(cmd)
redir => result
silent execute a:cmd
@hokaccha
hokaccha / answer.txt
Created November 22, 2012 02:44 — forked from shigeki/hello.js
第1回Node.js入門勉強会 レポート課題
**課題1
なぜエラーが発生したのかその理由を記述しなさい。
server.close()を呼ぶとこれ以上のコネクションは受け付けなくなるが、
既存のコネクションに関してはそのまま接続された状態になる。
また、HTTPの接続はkeep-aliveで行われるため、明示的にコネクションを
終了させなければ接続がタイムアウトするまでコネクションは生きている。
最初のリクエスト(GET /)のときにserver.close()が呼ばれ、新規接続を
@hokaccha
hokaccha / concern.rb
Created December 18, 2012 05:00 — forked from CodeIQ/concern.rb
# coding: utf-8
class Concern < ActiveRecord::Base
belongs_to :publication
end
@hokaccha
hokaccha / Rakefile
Created August 2, 2012 05:48 — forked from jeffreyiacono/Rakefile
rake task for precompiling assets using sprockets within a sinatra app + view helpers
require 'rubygems'
require 'bundler'
Bundler.require
require './application'
namespace :assets do
desc 'compile assets'
task :compile => [:compile_js, :compile_css] do
end
@hokaccha
hokaccha / caveatPatchor.js
Created April 12, 2012 02:18 — forked from protocool/caveatPatchor.js
Sample Propane caveatPatchor.js file
/**
Sample Propane caveatPatchor.js file based on tmm1's avatar hack.
You'll need at least version 1.1.1 to experiment with this:
http://propaneapp.com/appcast/Propane.1.1.1.zip
Once I'm sure exposing this hack-injection point doesn't cause problems
I'll do an official auto-updating version.
As of version 1.1.1, Propane will load and execute the contents of
#!/usr/bin/env perl
use strict;
use warnings;
use Pod::Usage;
use Text::Markdown 'markdown';
use HTML::TreeBuilder;
use List::Util 'max';
@hokaccha
hokaccha / routes.js
Created October 15, 2011 02:32 — forked from tj/routes.js
Express routes
var app = require('../app');
var colors = require('colors');
function format(method) {
switch (method) {
case 'get': return 'GET '.grey;
case 'post': return 'POST '.cyan;
case 'put': return 'PUT '.green;
case 'delete': return 'DELETE '.magenta;
default: return method.toUpperCase();
@hokaccha
hokaccha / gist:951652
Created May 2, 2011 14:08 — forked from tacamy/gist:951646
JavaScript UA Navigator(Android+'Mobile')
if ((navigator.userAgent.indexOf('iPhone') !== -1 && navigator.userAgent.indexOf('iPad') === -1) || navigator.userAgent.indexOf('iPod') !== -1 || /Android.+Mobile/.test(navigator.userAgent)) {
location.href = '/hoge/';
}
#!/usr/bin/env perl
use strict;
use warnings;
use Pod::Usage;
use Text::Markdown 'markdown';
use HTML::TreeBuilder;
use List::Util 'max';

やりたいこと

  • 親側の変更を子のComponentに伝えたい
  • 子にどうやって渡したらいいのかわからな
  • イベント/ハンドラもどうやって渡せばいいのか