Skip to content

Instantly share code, notes, and snippets.

🇯🇵
I cannot speak English.

KAWAHARA Keisuke kyohsuke

🇯🇵
I cannot speak English.
View GitHub Profile
View example.rb
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'binding_of_caller'
end
class MustImplementError < NotImplementedError
View after.yaml
aaa:
- a1
- a2
aa2:
- aa1
- aa2
bbb:
- b1
- b2
View my.cnf
[mysqld]
innodb_buffer_pool_size=5M
innodb_log_buffer_size=256K
query_cache_size=0
max_connections=64
key_buffer_size=8
thread_cache_size=0
host_cache_size=0
innodb_ft_cache_size=1600000
innodb_ft_total_cache_size=32000000
View yes.c
/*
* Copyright (c) 1987, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
View keybase.md

Keybase proof

I hereby claim:

  • I am kyohsuke on github.
  • I am kyohsuke (https://keybase.io/kyohsuke) on keybase.
  • I have a public key whose fingerprint is 8CF4 A6E9 695A 23DA 0965 B9AF 6BFA C18A 177F 64C4

To claim this, I am signing this object:

@kyohsuke
kyohsuke / boost_and_mysql.patch
Created Oct 28, 2015
Boost 1.59.0 & MySQL 5.7.9
View boost_and_mysql.patch
diff --git Library/Formula/boost.rb Library/Formula/boost.rb
index 96d698c..63047d1 100644
--- Library/Formula/boost.rb
+++ Library/Formula/boost.rb
@@ -1,19 +1,11 @@
class Boost < Formula
desc "Collection of portable C++ source libraries"
homepage "http://www.boost.org"
- url "https://downloads.sourceforge.net/project/boost/boost/1.58.0/boost_1_58_0.tar.bz2"
- sha256 "fdfc204fc33ec79c99b9a74944c3e54bd78be4f7f15e260c0e2700a36dc7d3e5"
View example.rb
require 'streeem'
Streeem.do {|line|
x = line.to_i
if x % 15 == 0 then
"FizzBuzz"
elsif x % 3 == 0 then
"Fizz"
elsif x % 5 == 0 then
"Buzz"
else
@kyohsuke
kyohsuke / streem.rb
Last active Oct 13, 2015
matz/streem for Homebrew
View streem.rb
require 'formula'
class Streem < Formula
homepage 'https://github.com/matz/streem'
head 'https://github.com/matz/streem.git'
def install
ENV.j1
system "make && make test"
bin.install "bin/streem"
@kyohsuke
kyohsuke / gist:6763232
Created Sep 30, 2013
俺がいつもやってるインデントって少数派なんだろうか?
View gist:6763232
//! Eclipse とかのオートインデントこんな感じになるけど、
switch (foo) {
case CASE_A:
case CASE_B:
someMethod();
break;
case CASE_C:
otherMethod();
break;
default:
@kyohsuke
kyohsuke / gist:6693940
Created Sep 25, 2013
クラスこじ開けて作っておいてこれ絶対使わないだろって思ってる
View gist:6693940
class Object
def marshalize
Marshal.dump self
end
alias_method :to_marshal, :marshalize
def marshal_parse(str)
Marshal.load str
end
alias_method :from_marshal, :marshal_parse
You can’t perform that action at this time.