Skip to content

Instantly share code, notes, and snippets.

View wnoguchi's full-sized avatar
😀

Wataru Noguchi wnoguchi

😀
View GitHub Profile
@wnoguchi
wnoguchi / capistrano.md
Created December 18, 2017 00:12 — forked from makinuk/capistrano.md
Capistrano Configuration with Gitlab

Capistrano Configuration

Configure Server

  • configure deploy user
groupadd deployers
adduser deploy
usermod -a -G deployers deploy
  • to give the deployers group the permissions, run the following and edit the /etc/sudoers file: visudo
@wnoguchi
wnoguchi / tenkaichi-git.md
Created October 1, 2017 14:25 — forked from teppeis/tenkaichi-git.md
天下一gitconfig大会

天下一gitconfig大会(サイボウズ社内git勉強会@2012/11/20)の@teppeisの資料です。

ぎっとぎとにしてやんよ

DojoCat

  • gistでmarkdown書いたらbookmarkletでプレゼンになるよ。
@wnoguchi
wnoguchi / fluentd_hacking_guide.md
Created September 16, 2016 07:17 — forked from sonots/fluentd_hacking_guide.md
Fluentd ソースコード完全解説

Fluentd ソースコード完全解説

英題:Fluentd Hacking Guide

目次

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

  • Fluentd の起動シーケンスとプラグインの読み込み
  • Fluentd の設定ファイルのパース
  • Input Plugin から Output Plugin にデータが渡る流れ
@wnoguchi
wnoguchi / a.sh
Created January 2, 2014 09:36 — forked from yoppi/a.sh
git grep 'hogehoge' -- "*.rb"
@wnoguchi
wnoguchi / pre-commit
Created December 31, 2015 04:36 — forked from DmZ/pre-commit
Git pre-commit hook to search for Amazon AWS API keys.
#!/bin/sh
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
fi

Install Apache log4php using Composer

First, install Composer if you don't yet have it:

php -r "eval('?>'.file_get_contents('https://getcomposer.org/installer'));"

Create a composer.json file with the following content:

{

@wnoguchi
wnoguchi / Vagrantfile
Created November 26, 2013 12:46 — forked from leifg/Vagrantfile
file_to_disk = './tmp/large_disk.vdi'
Vagrant::Config.run do |config|
config.vm.box = 'base'
config.vm.customize ['createhd', '--filename', file_to_disk, '--size', 500 * 1024]
config.vm.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk]
end
#!/usr/bin/env ruby
# http://sssslide.com/speakerdeck.com/a_matsuda/rails3-recipe-book-gaiden#114
ARGV.each do |file|
File.open(file,'r+:UTF8-MAC') do |f|
str = f.read
f.rewind
f.truncate(0)
f.set_encoding('UTF-8')
@wnoguchi
wnoguchi / clients.md
Last active December 23, 2015 02:39 — forked from defunkt/clients.md
Gistクライアントの一覧。forkした。

Gist Clients

Want to create a Gist from your editor, the command line, or the Services menu? Here's how.

Editor Support