Skip to content

Instantly share code, notes, and snippets.

@yoshikaw
yoshikaw / .screenrc
Created November 2, 2010 22:09
my GNU Screen setting at 2010/11/03
#
# .screenrc - GNU screen user configuration file
#
# $Id: .screenrc 190 2010-04-17 07:54:54Z yoshikaw $
#
# @see http://www.informatik.uni-hamburg.de/RZ/software/screen/screen_toc.html
# @see http://www.limy.org/program/screen_command.html
#
# Escape key is C-t, literal is a.
@yoshikaw
yoshikaw / gist:852192
Created March 3, 2011 02:14
zsh履歴ファイルのUNIX時間を人に優しい形にするperlワンライナー
cat ~/.zsh_history | perl -pe 's/: (\d+):/@a=(localtime($1));sprintf("[%04d\/%02d\/%02d %02d:%02d] ",$a[5]+1900,$a[4]+1,@a[3,2])/eg;'
<<出力例>>
[2010/12/28 13:00] 0;ls -altr
[2010/12/28 13:00] 0;svn update
@yoshikaw
yoshikaw / gist:854169
Created March 4, 2011 04:28
bashでプログラムの実行結果のdiff3を取ってみたが、何か期待値と違うけどよく分からん…
diff3 hoge.txt fuga.txt piyo.txt
====
1:1c
hoge
2:1c
fuga
3:1c
piyo
@yoshikaw
yoshikaw / .dir_colors
Created March 4, 2011 07:46
黒背景を使っているとlsの出力が暗すぎて困るのでいろいろ変えていたりします。
# Configuration file for the color ls utility
# This file goes in the /etc directory, and must be world readable.
# You can copy this file to .dir_colors in your $HOME directory to override
# the system defaults.
# $Id: .dir_colors 200 2010-04-17 11:21:57Z yoshikaw $
# COLOR needs one of these arguments: 'tty' colorizes output to ttys, but not
# pipes. 'all' adds color characters to all output. 'none' shuts colorization
# off.
@yoshikaw
yoshikaw / gist:862031
Created March 9, 2011 11:07
CygwinのscreenでコピーバッファをWindowsクリップボードに流し込むっ!
# changes the filename used for reading and writing with the paste buffer.
bufferfile 'screen/screen-exchange'
# copy the screen pastbuffer to the Cygwin pastebord
bindkey -m ' ' eval 'stuff \040' 'writebuf' 'exec sh -c "/usr/bin/putclip < screen/screen-exchange"'
bindkey -m Y eval 'stuff Y' 'writebuf' 'exec sh -c "/usr/bin/putclip < screen/screen-exchange"'
bindkey -m W eval 'stuff W' 'writebuf' 'exec sh -c "/usr/bin/putclip < screen/screen-exchange"'
@yoshikaw
yoshikaw / gist:907009
Created April 7, 2011 03:57
ISOファイルからお目当てのrpmファイルをisoinfoコマンドで探す
% find /path/to/many/iso -type f -exec isoinfo -Jf -i {} \; | grep need-rpm
@yoshikaw
yoshikaw / aipo_installer_debian.patch
Created April 17, 2011 14:57
aipo 6.0.0.0のインストーラをダマくらかしてdebianにインストールするためのしょうもないパッチ
--- bin/euc/installer.sh.bak 2011-04-12 21:56:54.000000000 +0900
+++ bin/euc/installer.sh 2011-04-17 23:12:18.180970504 +0900
@@ -244,9 +244,9 @@
echo "checking gcc... "
fi
-rpm -qa --qf "%{GROUP},%{NAME}¥n" > ${script_path}/bin/rpmlist
+COLUMNS=200 dpkg -l > ${script_path}/bin/rpmlist
-tmp_str=`cat ${script_path}/bin/rpmlist | grep readline-devel`
@yoshikaw
yoshikaw / gist:958703
Created May 6, 2011 09:51
git版screenのスタートアップ設定の一部。起動時にレイアウト、グループをキメるっ!
#
# .screenxrc.startup - GNU screen startup file for version 4.1.x
#
# *** this configuration file called at first time only ***
#
# include default .screenxrc
source '.screenxrc'
defencoding eucjp
@yoshikaw
yoshikaw / gist:960756
Created May 7, 2011 19:23
pdumpfs 1.3をruby 1.9環境で使うための最低限のパッチ
--- a/pdumpfs.in 2011-05-08 04:21:15.000000000 +0900
+++ b/pdumpfs.in 2011-05-08 04:22:13.000000000 +0900
@@ -48,7 +48,7 @@
#
require 'find'
-require 'ftools'
+require 'fileutils'
require 'getoptlong'
require 'date'
@yoshikaw
yoshikaw / gist:961873
Created May 9, 2011 00:59
CentOS 5.6 screen 4.0.3-4.el5 のscreenrcパッチの内容
diff -up screen-4.0.3/etc/etcscreenrc.screenrc screen-4.0.3/etc/etcscreenrc
--- screen-4.0.3/etc/etcscreenrc.screenrc 2003-12-05 14:46:13.000000000 +0100
+++ screen-4.0.3/etc/etcscreenrc 2011-02-01 17:05:14.632416657 +0100
@@ -36,8 +36,8 @@ vbell_msg " Wuff ---- Wuff!! "
# IC insert multiple chars
# nx terminal uses xon/xoff
-termcap facit|vt100|xterm LP:G0
-terminfo facit|vt100|xterm LP:G0
+termcap facit|vt100|xterm|xterm-* LP:G0