Skip to content

Instantly share code, notes, and snippets.

View kentaro's full-sized avatar

Kentaro Kuribayashi kentaro

View GitHub Profile
/*
Do not change this file.
Generated from BridgeSupport.
*/
#include "cocoa.h"
#import "UIKit/UIAccelerometer.h"
#import "UIKit/UIAccessibility.h"
#import "UIKit/UIAccessibilityAdditions.h"
#import "UIKit/UIAccessibilityConstants.h"
#import "UIKit/UIAccessibilityElement.h"
@kentaro
kentaro / chef_solo_bootstrap.sh
Created June 3, 2012 13:08
Bootstrap Chef Solo
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline5-dev libyaml-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz
tar -xvzf ruby-1.9.3-p194.tar.gz
cd ruby-1.9.3-p194/
./configure --prefix=/usr/local
make
make install
@kentaro
kentaro / gist:2182582
Created March 24, 2012 13:07
cdd.zsh
#
# zaw-src-cdd
#
# zaw source for cdd command
#
(( $+functions[cdd] )) || return
function zaw-src-cdd () {
if [ -r "$CDD_PWD_FILE" ]; then
@kentaro
kentaro / gist:1680577
Created January 26, 2012 02:30
Sub::Name
#!/usr/bin/env perl
use strict;
use warnings;
package A;
use Carp qw(cluck);
*name = sub { cluck 'no name' };
package B;
use Sub::Name;
@kentaro
kentaro / gist:1575476
Created January 7, 2012 18:01
今日は何の日?
javascript:(function() {var date=(new Date()); location.href='http://ja.wikipedia.org/wiki/'+(date.getMonth()+1)+'月'+date.getDate()+'日#.E8.A8.98.E5.BF.B5.E6.97.A5.E3.83.BB.E5.B9.B4.E4.B8.AD.E8.A1.8C.E4.BA.8B';})()
@kentaro
kentaro / file0.txt
Created November 11, 2011 12:08
使ってないポートを取得する (Perl) ref: http://qiita.com/items/1018
#!/usr/bin/env perl
use strict;
use warnings;
use v5.14;
use IO::Socket::INET;sub empty_port () {
my $sock = IO::Socket::INET->new(
Prot => 'tcp',
Listen => 1,
(($^O eq 'MSWin32') ? () : (ReuseAddr => 1)),
);
@kentaro
kentaro / gist:1308245
Created October 24, 2011 02:30
Test::mysqldにどばっとデータつっこむ
use DBI;
use Path::Class;
use Test::mysqld;
my $mysqld = Test::mysqld->new(
my_cnf => {
'skip-networking' => '',
}
) or plan skip_all => $Test::mysqld::errstr;
@kentaro
kentaro / gist:1267686
Created October 6, 2011 15:28
『エジプト詩集』
* 便所の光景
額から胸へと、大きな弧を成し、身を反り出し、
いちはやく唇が嘴へ、やや遅れて突き出た胸には、白い綿毛。
エジプトの女王は、いまにも空へ舞い上がろうとしている。
勇壮さでもって、きたるべき敗退の予感を押し隠す
戦士の瞳は、かすかに潤んでいる。
地中海に散りばめられた宝石。
蠅をとらえる。
黒色の夜が空を千に裂いて、女たちに埋め込んでいく。
@kentaro
kentaro / gist:1167734
Created August 24, 2011 10:21
Semantic False Class
package main;
use strict;
use warnings;
package SemanticFalse;
use strict;
use warnings;
use overload bool => sub {
my $self = shift;
~/.emacs.d/elisp
$ perlbrew install 5.14.1
The given directory 5.14.1 is not a git checkout of perl repository. To
brew a perl from git, clone it first:
git clone git://github.com/mirrors/perl.git
perlbrew install perl