mount virtualbox shared folder in Ubuntu

fstab hogesharedname /mnt/hoge vboxsf uid=hogeuser,gid=hogegroup

Ubuntu上で日本語ファイル名のディレクトリをwindows用にzipファイルにする | make a zip file from a japanease name directory for windows on linux

for i in * do test -d "$i" || continue echo "$i" convmv -r --notest -f utf8 -t cp932 "$i"/* &&\ zip -jr "$i".zip "$i"/* &&\ rm -rf "$i" done

ibus setting in emacs on Ubuntu 10.04

install ibus.el http://www11.atwiki.jp/s-irie/pages/21.html sudo add-apt-repository ppa:irie/elisp sudo apt-get update sudo apt-get install ibus-el .emacs ;;;; http://www11.atwiki.jp/s-irie/pages/21.html (require 'ibus) ;; Turn on ibus-mod…

minimum .emacs.d/init.el

(global-set-key "\C-h" 'backward-delete-char) ;; assign Ctrl-h to backspace (show-paren-mode t) ;; emphasis () (menu-bar-mode nil) ;; hide menu bar (setq-default transient-mark-mode t) ;; emphasis region (setq require-final-newline t) (set…

How to profile tomcat in Eclipse

purpose profile servlet on tomcat prerequire WTP http://d.hatena.ne.jp/sppr/20090923/1253684980 TPTP http://d.hatena.ne.jp/sppr/20090922/1253635645 install Menu: Help > Install New Software Work with: Galileo TPTP Profiling for Web applica…

How to install HTML Editor in Eclipse for writing html,css

install Menu: Help > Install New Software Work with: Galileo Web Page Editor

How to install WTP in Eclipse for tomcat

purpose create webapp project start/stop tomcat debug servlet and jsp in webapp project install Menu: Help > Install New Software Work with: Galileo Eclipse Java EE Developer Tools JST Server Adapers JST Server Adapers JST Server UI JST We…

How to install TPTP in Eclipse for profiling

purpose profiling when JUNIT method is executed install TPTP Menu: Help > Install New Software Work with: Galileo TPTP Platform Project TPTP Tracing and Profiling Tools Project install Agent Controller http://dev.eclipse.org/viewcvs/index.…

Ubuntu 9.04 でキーボードのキーをカスタマイズ|How to change a keyboard key to other key

右シフトキーをバックスラッシュ/バー キーに変更する|set right shift key as backslach/bar key ~/.Xmodmap ファイルを作成|create ~/.Xmodmap ! set right shift key as backslash/bar key keycode 62 = backslash bar 再ログインすると設定ダイアログが…

Ubuntu 9.04 にメイリオ フォントを設定する|How to set Meiryo Fonts in Ubuntu 9.04

メイリオ フォントファイルを ~/.fonts ディレクトリに配置する|put Meiryo font files in ~/.fonts directory ls ~/.fonts/ .fonts/meiryob.ttc .fonts/meiryoKeGothic.ttc .fonts/meiryoKeGothicB.ttc .fonts/meiryo.ttc フォントキャッシュの再構築|rebui…

md raid hddのセットを別のPCへ取り付ける | how to attach md raid1 hdds to the other pc or server

PCへ取り付ける md raid1 の hdd のセットは /dev/sdb, /dev/sdc とする|attaching hdds are supposed to /dev/sdb and /dev/sdc raid hdd の 確認 | confirm raid hdds status sudo mdadm --examine --scan /dev/sdb /dev/sdc ARRAY /dev/md0 level=raid1 n…

bashプロンプトに色を付ける|set color of prompt

プロンプトを緑色に設定する|set color of prompt to green GREEN="0;32" START_COLOR="\e[${GREEN}m" END_COLOR="\e[0m" export PS1="${START_COLOR}[\u@\h \W]\$${END_COLOR} " 色を変えたい部分を ${START_COLOR} と ${END_COLOR} で囲む|change color be…

Perlの始め方|How to start to learn perl

man perlintro

bashの履歴を複数端末で共有する|How to share bash history in multiple terminals

~/.bashrc に以下を設定|add follow settings in ~/.bashrc # Make bash append rather than overwrite the history on disk shopt -s histappend # Whenever displaying the prompt, write the previous line to disk and read unread history lines export…

1日毎に交互に2つ処理を実行する|do two commands day by day

現在日時を1970年からの日数に変換し、その数が偶数、奇数で処理を振り分ける|calculate days from 1970. when the days is even, do one command and when the days is odd, do another command. #!/bin/sh set -u A=`date +%s` echo $A is seconds from 19…

install yum-cron

デフォルトの yum-updated があまり良くないので、代わりに yum-cron をインストールして利用する stop yum-updated sudo /sbin/service yum-updated stop sudo /sbin/chkconfig yum-updatesd off install sudo yum install yum-cron sudo /sbin/chkconfig y…

vsftpdで特定ユーザーのみchrootでftp loginを許可する設定

install sudo yum install vsftpd 自動起動 sudo /sbin/chkconfig vsftpd on 匿名ユーザーの禁止 /etc/vsftpd/vsftpd.conf に以下を追加 anonymous_enable=NO 特定のユーザーのみftpを許可 /etc/vsftpd/vsftpd.conf に以下を追加 userlist_deny=NO /etc/vsft…

aliases 設定

root宛てのメールを自分のメールアドレスへ転送する設定 /etc/aliases に以下を追記 root: hoge@mailaddress.com 設定の再読み込み sudo /usr/bin/newaliases

sshd 設定

sshd をセキュアに運用するための設定 /etc/ssh/sshd_config を編集 # allow only Protocol2 Protocol 2 # deny root login PermitRootLogin no # allow only specify users AllowUsers <accountname> <accountname> ... 設定の再読み込み sudo /sbin/service sshd reload</accountname></accountname>

CentOS 5 に samba をインストール

インストール, 起動設定 sudo yum install samba sudo /sbin/chkconfig smb on ユーザーの追加 sudo pdbedit -a ユーザー名 既存のlinuxユーザー名で追加 パスワードはPAMとは別に設定する 文字コードはサーバーの文字コードがUTF-8であれば、デフォルトの設…

Intel D945GCLF に CentOS 5をインストール

Intel D945GCLF http://www.intel.com/products/motherboard/D945GCLF/index.htm D945GCLF に CentOS5 をインストールするとNICが認識しない。それ以外は問題なし。 D945GCLF の Product Specification を見ると LAN Subsystem は Realtek RTL8102EL device …

個人用 lisp ファイルを配置するディレクトリの作成

~/.emacs.d/elisp を作成し、ここに個人用lispファイルを配置する ~/.emacs.d/elisp をload-path に追加 以下を ~/.emacs.d/init.el に記述 (setq load-path (cons "~/.emacs.d/elisp" load-path))

Install NTEmacs on Windows XP

Windows XP で emacs(NTEmacs) を利用する インストール 下記よりダウンロードし解凍 http://ntemacsjp.sourceforge.jp/matsuan/IndexJp.html C:\user\local\ に emacs ディレクトリをコピー .emacs のための設定 ユーザーがhogeの場合 以下に .emacs ファイ…

.emacs ファイルの配置

~/.emacs ファイルは配置せず ~/.emacs.d/init.el を配置し、このファイルに設定を記述する emacs は ~/.emacs が存在しない場合、~/.emacs.d/init.el を読み込む ~/.emacs.d/ ディレクトリで emacs の設定を完結できる ~/.emacs.d/ ディレクトリを subversi…

シェルスクリプトの二重起動禁止|how to forbid to start same process in shell script

pgrep コマンドを利用 use pgrep command http://www.linux.or.jp/JM/html/procps/man1/pgrep.1.html シェルスクリプト名のみ(引数は考慮しない)で二重起動を禁止 #!/bin/sh if [ `pgrep -fo $0` -ne $$ ] then echo $0' is already exist.' exit fi echo $0…

Poderosa の設定のバックアップ

Poderosa のバックアップは、以下のファイル。これらをバックアップ。 C:\Program Files\Poderosa\options.conf C:\Program Files\Poderosa\ssh_known_hosts リストア時には、この二つのファイルを上書きする。

Windowsのプログラムの格納場所

ダウンロードしたプログラムは以下のディレクトリにカテゴリのディレクトリを作成し格納する C:/usr/local/src/ 例:テキストエディタ texteditorprogram.zip を以下に格納 editor はカテゴリのディレクトリ C:/usr/local/src/editor/texteditorprogram.zip …

Fedora Core 5 への Samba 3.0 インストール&設定

インストール OSインストール時にインストール or yum でインストール sudo yum install samba ファイル名の文字コードセット(日本語)の設定 /etc/samba/smb.conf の [global] に以下を追加 OS の文字コードが EUC-JPの場合、unix chasert を eucJP-ms に設…

cygwinのインストール

cygwinは以下のページを参考にインストール http://www.sixnine.net/cygwin/cygwin-doc/professional.html cygwin用に3GBくらいのパーティションを作成。このパーティションは D: に設定 C:/home/$USERNAME を作成。このディレクトリにMy Documentを設定 "ス…