This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zcat imapserv.*.stat.gz | grep -e ' .... ms' | sed -e 's#[;/\(\)]# #g' | awk '{printf("%s %s ",$2,$6); for(i=9;i<NF;i++){printf("%s%s",$i,OFS=" ")}print $NF}' | column -t | sort -k2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" POSTTASK | |
" cd .vim/plugin/jedi-vim; git submodule update --init | |
" wget | |
" https://gist.githubusercontent.com/miyakogi/2338fc7705fdc515447e/raw/12e334ec6c3d0817c8171434f50b1f352621bf0c/nim.snip -O ~/.vim/snippets/nim.snip | |
set tabstop=8 | |
set softtabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
set smarttab |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DATESTR=`date "+%Y%m%d%H%M%S"` | |
INTERVAL=3 | |
DURATION=10 | |
OUTDIR=/tmp/pss$DATESTR | |
TARGETS="java influxd" | |
function pgreps() { echo $(for target in $@ ; do pgrep $target; done); return 0; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:r !for i in $(seq 53 152); do printf 'mig\%07d\n' $i ; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import itertools | |
SPEC = { | |
"suit": ["S","H","D","C"], | |
"rank": ["2","3","4","5","6","7","8","9","10","J","Q","K","A"], | |
"hand": ( | |
("4K", lambda x: max(snds(uniq_cnt(snds(x)))) == 4), | |
("FH", lambda x: sorted(snds(uniq_cnt(snds(x)))) == sorted((2,3))), | |
("3K", lambda x: max(snds(uniq_cnt(snds(x)))) == 3), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Hello, World!</title> | |
<script src="http://fb.me/react-0.11.2.js"></script> | |
<script src="http://fb.me/JSXTransformer-0.11.2.js"></script> | |
</head> | |
<body> | |
<div id="content"></div> | |
<script type="text/jsx"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<style type="text/css"> | |
html { height: 100% } | |
body { height: 100%; margin: 0px; padding: 0px } | |
#map { height: 100% } | |
</style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# json | |
$ echo '{ "name": "pp.py", "list": [ 1, 2, 3, "Da!" ] }' | pp.py | |
#yaml | |
$ echo '{ name: pp.py, list: [ 1, 2, 3, Da! ] }' | pp.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python pp.py <ファイル名> [インデント数] |