Skip to content

Instantly share code, notes, and snippets.

View glidenote's full-sized avatar

Akira Maeda glidenote

View GitHub Profile
@lamanotrama
lamanotrama / oauth2_proxy.conf
Created January 13, 2016 05:45
oauth2_proxy + nginx auth_requstのサンプルだよ
# please include in server context
# ref: https://github.com/bitly/oauth2_proxy#endpoint-documentation
# for checking login status.
# only returns a 202 Accepted response or a 401 Unauthorized response;
location = /oauth2/auth {
internal;
# return 202 if local request, for inftataster test
set $local 0;
@sonots
sonots / out_forward.conf
Last active November 2, 2021 06:14
ログの欠損をできるだけ避ける Fluentd の out_forward 設定サンプル cf. http://blog.livedoor.jp/sonots/archives/44690980.html
<source>
type in_tail
# ...
tag raw.eventlog
</source>
<match raw.**>
type forward
log_level "#{ENV['DEBUG'] ? 'debug' : 'info'}"
@udzura
udzura / consul-workshop.md
Last active November 7, 2021 12:17
やわらか Consul

やわらか Consul

こわくないConsul

Setup

事前に、ワークショップ用のサンプルプロジェクトをチェックアウトし、VMの作成だけしておきましょう。 --no-provision でお願いします!

@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"
@ravelll
ravelll / peco-select-rake-task.zsh
Created July 2, 2014 04:42
Zsh script to show and select rake tasks using peco.
function peco_select_rake_task_all() {
local tasks="bundle exec rake -AT"
task=$(eval $tasks | peco --query "$LBUFFER" )
task_split=("${(s/ /)task}")
BUFFER=$task_split[1,2]
CURSOR=$#BUFFER
zle -R -c
}
zle -N peco_select_rake_task_all
@udzura
udzura / tutorial.md
Created June 2, 2014 03:31
Hubot + CoffeeScript ではじめるやわらかプログラミング入門

やわらかプログラミング入門

  • Hubot であそぼう


始めに、地図を描く

#!/usr/bin/env ruby
# @author Aaron Lampros
#
# Github-flavored markdown to HTML, in a command-line util.
#
# $ cat README.md | ./github-flavored-markdown.rb
#
# Notes:
# You will need to install Pygments for syntax coloring
# ```bash
@koemu
koemu / getswap.sh
Created December 18, 2013 01:09
各プロセスのスワップ使用量を調べる。 なお、root or sudo での実行が必要。 参照元: http://northernmost.org/blog/find-out-what-is-using-your-swap/
#!/bin/bash
# Get current swap usage for all running processes
# Erik Ljungstrom 27/05/2011
# Updated: 2013-11-13 Yuichiro Saito
SUM=0
OVERALL=0
for DIR in `find /proc/ -maxdepth 1 -type d | egrep "^/proc/[0-9]"` ; do
PID=`echo $DIR | cut -d / -f 3`
PROGNAME=`ps -p $PID -o comm --no-headers`
for SWAP in `grep Swap $DIR/smaps 2>/dev/null| awk '{ print $2 }'`
@tcnksm
tcnksm / docker_cheat.md
Last active August 5, 2021 03:59 — forked from wsargent/docker_cheat.md
Docker 虎の巻

Docker 虎の巻

何故Dockerを使うべきか

Why Should I Care (For Developers)

"Dockerが面白いのはシンプルな環境に隔離性と再現性をもたらしてくれることだ.ランタイムの環境を一度作れば、パッケージにして別のマシンでも再利用することできる.さらに,すべてはホスト内の隔離された環境で行われる(VMのように).最も素晴らしい点は,シンプルかつ高速であることだ."