Skip to content

Instantly share code, notes, and snippets.

View koic's full-sized avatar

Koichi ITO koic

View GitHub Profile
@kakutani
kakutani / pragprog-sec-dot.png
Last active December 21, 2016 05:00
WIP: Visualize the related sections in "The Pragmatic Programmer" (ja)
pragprog-sec-dot.png
(make-variable-buffer-local
(defvar sushi-bar--conveyor-belt ""))
(make-variable-buffer-local
(defvar sushi-bar--backup-mode-line-format nil))
(defvar sushi-bar--updater-object nil)
(defun sushi-bar--sushi-is-ready-p ()
(eq (random 15) 1))
@seki
seki / bartender.rb
Created October 2, 2016 09:18
bartender for mruby
# -*- coding: utf-8 -*-
module Bartender
class App
class FDMap
def initialize; @map = {}; end
def []=(fd, v)
@map[fd.to_i] = [fd, v]
end
def [](fd)
_, v = @map[fd.to_i]
@taichi
taichi / code_review_basics.md
Last active May 30, 2024 14:23
チームでコードを書き始めた後、「どうやらレビューってやつをした方が良いらしい」くらいの若手に向けた資料です。

コードレビューの基本


一番大事な事

ソースコードはプロジェクトの共同所有物である

  • 誰かだけが触れるコードを無くす
@ericclemmons
ericclemmons / example.md
Last active September 20, 2024 12:46
HTML5 <details> in GitHub

Using <details> in GitHub

Suppose you're opening an issue and there's a lot noisey logs that may be useful.

Rather than wrecking readability, wrap it in a <details> tag!

<details>
 Summary Goes Here
@willnet
willnet / be_a_rails_contributer.md
Last active August 21, 2023 05:44
Railsコントリビュータへの道

これはなに

  • Railsにプルリクストを送るときに知っておくと便利なお作法集
  • Railsにプルリクエストを送りたいけど何から始めたらいいのかわからない人向けの指針

お作法についてはRuby on Rails に貢献する方法 | Rails ガイドを参考にしています。

前提知識

Railsのコードを読むには、最低限次の二つの知識があったほうがよいです

@joker1007
joker1007 / esm_drinkup_sake_list.md
Last active December 20, 2015 06:48
Rubykaigi2015 ESM drinkupで提供予定の日本酒一覧

ESM Drinkup で提供予定のお酒一覧

  • いづみ橋 恵 青ラベル 純米吟醸 1800ml
  • いづみ橋 桃色黒とんぼ きもと純米酒 1800ml
  • 七本鎗 無有(むう) 無農薬純米 1800ml
  • 七本鎗 純米吟醸 "吟吹雪" 1800ml
  • 七田 純米吟醸 雄町50 1800ml
  • 三井の寿(みいのことぶき) 純米吟醸 酒未来 福岡県産 1800ml
  • 上喜元 純米 "雄町" 1800ml
  • 作 雅乃智(純米大 吟醸中取り) 1.8L
@kamipo
kamipo / gist:61ee662ee0b1127f0989
Last active August 28, 2018 01:51
MySQL Unicode Collation Behavior

MySQL Unicode character set has following collations mainly:

  • xxx_bin: compare all characters by these code point as weight.
  • xxx_general_ci: compare almost characters by these code point as weight.
  • xxx_unicode_ci: compare all characters by these collating weight.

ref. http://dev.mysql.com/doc/refman/5.6/en/charset-unicode-sets.html

When xxx is utf8, can treat only BMP characters.

@onk
onk / .rubocop.yml
Last active January 15, 2018 02:30
僕の使っている .rubocop.yml
# rubocop v0.35.0 から inherit_gem という機能が増えたので gem にしました
# https://github.com/onk/onkcop
inherit_gem:
onkcop: "config/rubocop.yml"
@sonots
sonots / fluentd_hacking_guide.md
Last active October 4, 2024 00:01
Fluentd ソースコード完全解説 (v0.10向け)

Fluentd ソースコード完全解説

英題:Fluentd Hacking Guide

目次

30分しかないため斜線部分は今回省く

  • Fluentd の起動シーケンスとプラグインの読み込み
  • Fluentd の設定ファイルのパース
  • Input Plugin から Output Plugin にデータが渡る流れ