Skip to content

Instantly share code, notes, and snippets.

View shiumachi's full-sized avatar

Sho Shimauchi shiumachi

View GitHub Profile
@shiumachi
shiumachi / make_install_apache_devel.sh
Created February 8, 2011 16:29
make and install apache (and APR)
#!/bin/bash
DEVEL_DIR=${HOME}/devel
cd srclib/apr
./buildconf
./configure --prefix=${DEVEL_DIR}/apr
make
make install
cd ../..
@shiumachi
shiumachi / sphinx-pdfja.patch
Created January 7, 2012 09:47
patch which makes sphinx enable to generate Japanese pdf file
diff --git quickstart.py quickstart.py
index 86dc047..267d31f 100755
--- quickstart.py
+++ quickstart.py
@@ -392,6 +392,7 @@ help:
\t@echo " epub to make an epub"
\t@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
\t@echo " latexpdf to make LaTeX files and run them through pdflatex"
+\t@echo " latexpdfja to make LaTeX files and run them through platex and dvipdfmx"
\t@echo " text to make text files"
@shiumachi
shiumachi / gist:3285804
Created August 7, 2012 14:28
cdh-user-jp@ のバグテスト用Hiveスクリプト
drop table test_table;
drop table test_table1;
drop table test_table2;
CREATE TABLE test_table (id INT, name STRING);
set hive.metastore.warehouse.dir=/tmp/warehouse;
CREATE TABLE test_table1 (id INT, name STRING);
set hive.metastore.warehouse.dir=/tmp/warehouse2;
CREATE TABLE test_table2 (id INT, name STRING);
@shiumachi
shiumachi / anything_setup.el
Created August 11, 2012 12:50 — forked from shirou/anything_setup.el
anything_setup.el
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; anything.el
;;
(require 'anything)
(require 'anything-config)
(require 'recentf)
(setq recentf-max-saved-items 1000)
(recentf-mode 1)
@shiumachi
shiumachi / nn_parse.py
Created August 25, 2012 03:39
simple NN log parser (pyfes LT 2012.08 sample code)
# pyfes LT 2012.08 用ソースコード
# namenode のログをパースして ログレベルをカウントするだけのコード
# ソースコードに日本語でコメント入れるのは多分初めて
#
import sys
# 1行毎のパース処理はここ
def parse(line):
arr = line.strip().split()
@shiumachi
shiumachi / wait_seconds.sh
Created November 28, 2012 05:30
wait N seconds
function wait_seconds()
{
func_name="wait_seconds"
if ! expr "$1" : '[0-9]*' > /dev/null ;
then
echo "${func_name} ERROR: argument is not number"
return
fi
for i in `seq $1`; do
echo "wait for `expr $1 + 1 - ${i}` seconds..."
@shiumachi
shiumachi / code_line_count.sh
Created January 24, 2013 15:30
コードの行数を数える via cocoatomo
find . -name "*.java" -exec wc -l {} \; | awk '{s+=$1}END{print s}'
@shiumachi
shiumachi / ltsv.rst
Last active December 23, 2015 11:33

LTSV

What is LTSV?

  • an extended format of TSV
  • you can label each field like this:

LTSV FAQ

This document is a translation of LTSV FAQ. (Japanese)

What is LTSV?

@shiumachi
shiumachi / gist:5308378
Created April 4, 2013 06:51
git fabric plugin 、まだ本家にマージされてない。以下の手順で cherry-pick 可能
git remote add santiycr git://github.com/santiycr/oh-my-zsh.git
git fetch santiycr
git cherry-pick 18ad97611740bc42a86b45297df5fe247d01e356
git cherry-pick 155343c2c29832c8cea1f391167e1b6ee4a13a74