Skip to content

Instantly share code, notes, and snippets.

View babarot's full-sized avatar
:octocat:
Work Hard

Masaki ISHIYAMA babarot

:octocat:
Work Hard
View GitHub Profile
@jzawodn
jzawodn / wait.sh
Created November 21, 2008 15:13
how to wait on multiple background processes and check exit status in bash
#!/bin/bash
FAIL=0
echo "starting"
./sleeper 2 0 &
./sleeper 2 1 &
./sleeper 3 0 &
./sleeper 2 0 &
@danmackinlay
danmackinlay / supervisord.sh
Created August 27, 2009 07:07
an init.d script for supervisord
#! /bin/sh
### BEGIN INIT INFO
# Provides: supervisord
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.
@Shougo
Shougo / .vimrc
Created April 17, 2010 00:09 — forked from tyru/.vimrc
" Capture {{{
command!
\ -nargs=+ -bang
\ -complete=command
\ Capture
\ call s:cmd_capture([<f-args>], <bang>0)
function! C(cmd)
redir => result
silent execute a:cmd
# NginxStats
# python nginxstats.py --servers="http://meuservido.com.br/nginx_status" --time=5
import os, sys, atexit, getopt
import re
import sys
import time
import urllib
class NginxStats():
@riywo
riywo / gist:874011
Created March 17, 2011 08:37
bashでパイプとかでつないでバッファされちゃう時

tail -fみたいに流しながら見たいんだけど、色んなコマンドが出力をバッファしちゃうので、困ったときはそのコマンドにバッファしないオプションが無いか探すのがオヌヌメ。 man command -> bufferとかで検索

grep

   --line-buffered
          Use line buffering, it can be a performance penality.

$ iostat -x 1 | grep --line-buffered 'sda'

awk

@clintel
clintel / gist:1155906
Created August 19, 2011 02:40
Fenced code in bullet lists with GitHub-flavoured MarkDown??

Fenced code blocks inside ordered and unordered lists

  1. This is a numbered list.

  2. I'm going to include a fenced code block as part of this bullet:

    Code
    More Code
    
@ponko2
ponko2 / zmv-examples.sh
Created January 4, 2012 03:09
複数ファイルの名前をまとめて変更する ref: http://qiita.com/items/1550
## 準備
# zmv を使用する前には `autoload zmv` する必要がある
# `man zshexpn` の PARAMETER EXPANSION とかも見ておくと捗る
# zmv の使用例については `man zsh-lovers` にたくさんあります
## 便利なオプション
## zmv のオプションについては `man zshcontrib` で調べることができる。
# zmv -n (実際にリネームする前に結果を確認)
zmv -n '*' '$f[5,-1]' # 例は頭4文字削除
# zmv -W ('(*)' '$1' を '*' で済ませられる)
@matope
matope / NoSQLデータモデリング技法.markdown
Created April 16, 2012 03:35
NoSQLデータモデリング技法

#NoSQLデータモデリング技法

原文:NoSQL Data Modeling Techniques « Highly Scalable Blog

I translated this article for study. contact matope[dot]ono[gmail] if any problem.

NoSQLデータベースはスケーラビリティ、パフォーマンス、一貫性といった様々な非機能要件から比較される。NoSQLのこの側面は実践と理論の両面からよく研究されている。ある種の非機能特性はNoSQLを利用する主な動機であり、NoSQLシステムによく適用されるCAP定理がそうであるように分散システムの基本的原則だからだ。一方で、NoSQLデータモデリングはあまり研究されておらず、リレーショナルデータベースに見られるようなシステマティックな理論に欠けている。本稿で、私はデータモデリングの視点からのNoSQLシステムファミリーの短い比較といくつかの共通するモデリングテクニックの要約を解説したい。

本稿をレビューして文法を清書してくれたDaniel Kirkdorfferに感謝したいと思う

@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@hayajo
hayajo / changelog_en.md
Last active June 27, 2024 02:39
ChangeLog を支える英語

ChangeLog を支える英語

ChangeLog を書く際によく使われる英語をまとめました。

ほとんど引用です。

基本形