Skip to content

Instantly share code, notes, and snippets.

View yukirii's full-sized avatar
✈️

Yuki Kirii yukirii

✈️
View GitHub Profile
@willnet
willnet / be_a_rails_contributer.md
Last active August 21, 2023 05:44
Railsコントリビュータへの道

これはなに

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

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

前提知識

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

### tcpdumpでHeaderを可視化するで。特定backendとの通信を見てみよか。
$ /usr/sbin/tcpdump -i bond0.2168 -s 3000 -A dst host <対象backendのIP> or src host <対象backendのIP>

################### passナシ
...!..3.GET /kakeru.css HTTP/1.1
User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.13.1.0 zlib/1.2.3 libidn/1.18 libssh2/1.2.2
Host: 10.10.10.10
Accept: */*
X-Forwarded-For: 10.10.10.10
@sue445
sue445 / README.md
Last active April 22, 2020 10:56
俺のitamaeの実行方法

roleとnodeを設定しておけばいい感じにrake taskを生成します

前提

下記のようなディレクトリ構成を想定しています

  • roles/
    • <role名>.rb
  • nodes/
    • <node名>.yml
  • spec/
@shokai
shokai / slack-reaction.coffee
Last active April 16, 2022 15:56
notify "reaction_added" event for slack.com
# Description:
# notify "reaction_added" event for slack.com
# http://shokai.org/blog/archives/10344
#
# Author:
# @shokai <[email protected]>
debug = require('debug')('hubot:slack-reaction')
_ = require 'lodash'
@clchiou
clchiou / non_graceful_shutdown.py
Created March 19, 2015 04:32
Python ThreadPoolExecutor (non-)graceful shutdown
#!/usr/bin/env python3
import concurrent.futures.thread
import sys
import time
from concurrent.futures import ThreadPoolExecutor, as_completed
def remove_file(path):
print('Removing file %s' % path)
@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 にデータが渡る流れ
@tpdn
tpdn / Makefile
Last active April 20, 2018 08:59
情報システム実験:組み込みオペレーティングシステム 非公式マニュアル
optusb: optusb.c
gcc -I /opt/local/include/libusb-legacy -L /opt/local/lib/libusb-legacy -lusb-legacy -Wall -o optusb optusb.c
clean:
rm -rf optusb *.o
@illoyd
illoyd / auth_spec_helpers.rb
Last active November 25, 2015 16:04
Digest auth helpers for Rails 4 and your test framework of choice (rspec shown here)
#
# This should go into spec/support/auth_spec_helpers.rb
module AuthSpecHelpers
##
# Convenience method for setting the Digest Authentication details.
# To use, pass the username and password.
# The method and target are used for the initial request to get the digest auth headers. These will be translated into 'get :index' for example.
# The final 'header' parameter sets the request's authentication headers.
def authenticate_with_http_digest(user, password, method = :get, target = :index, header = 'HTTP_AUTHORIZATION')
@voluntas
voluntas / erlang.rst
Last active March 15, 2024 13:15
実践 Erlang/OTP コトハジメ 2014.11

実践 Erlang/OTP コトハジメ 2014.11

更新:2014-11-20
バージョン:0.0.5
作者:@voluntas
URL:http://voluntas.github.io/

概要