2012年6月30日土曜日

オンランから.htaccessを作成してくれるサイト

すげー便利 http://www.htaccesseditor.com/

2012年6月26日火曜日

gitでpushしたらpushした先でワーキングツリーをリセット

それhookで出来るよ

cd .git/hooks/
mv post-receive.sample post-receive
chmod +x post-receive
echo 'cd /home/hoge/huga/' >> post-receive
echo 'git --git-dir=.git reset --hard HEAD' >> post-receive

2012年6月23日土曜日

SSH力を身につけた


sshで繋いじゃった後でも
Enter押してすぐに
~Cでコンソール(helpコマンド使えるよ)
~#でフォワード一覧
~?でヘルプ

↓みたいに.ssh/config書けば多段がいけるらしい
Host humidai
 HostName hoge.co.jp
Host target
 ProxyCommand ssh -W 192.168.x.x:22 humidai


参考リンク
SSH力をつけよう

2012年6月16日土曜日

2012年6月9日土曜日

Linuxからリモートデスクトップ(RDP)

xfreerdpでいけます
apt-get install freerdp-x11

gitでbareじゃない共有リポジトリを作る

共有リポジトリだと作業フォルダが無くて不便なので

[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
[receive]
        denyCurrentBranch = ignore
コマンドならこう
git config --add receive.denyCurrentBranch ignore
参考リンク http://d.hatena.ne.jp/shokai/20101105/1288968082

2012年6月8日金曜日

Linuxデスクトップのガジェットとか

システムモニタ
・adesklets
・conky
・gdesklets

参考リンク
http://wikiwiki.jp/linux/?FrontPage
http://usamimi.info/~linux/

2012年6月4日月曜日

DebianでKVMを試してみた

こんな感じでDebian Wiki通りにやればOK
-cの後は/dev/cdrom or iso
virt-install -n testos -r 128 --disk path=/tmp/testos.dsk,size=10 --os-type=linux --network bridge=br0 --vncport=5900 --vnclisten=0.0.0.0 -c /tmp/debian.iso
あとはこんな感じでXサーバーにコンソールを出力させた
virt-viewer testos --display=192.168.0.5:0
仮想マシンの削除
virsh destroy testos2
virsh undefine testos2
参考リンク
http://docs.redhat.com/docs/ja-JP/Red_Hat_Enterprise_Linux/5/html/Virtualization/chap-Virtualization-Managing_guests_with_virsh.html

brctlでブリッジインターフェイスを作成

KVMを使うときに必要になったブリッジインターフェイスの設定メモ コマンドでは以下のようにやればO
 brctl addbr br0
 brctl addif br0 eth0
/etc/network/interfaces
auto lo br0
iface lo inet loopback

allow-hotplug eth0
auto eth0
iface eth0 inet static
address 192.168.0.4
netmask 255.255.255.0
gateway 192.168.0.1

iface br0 inet static
bridge_ports eth0
address 192.168.0.40
netmask 255.255.255.0
gateway 192.168.0.1
参考リンク
brctl でLinuxマシンをHUBにする - いますぐ実践! Linuxシステム管理 第2回 KVMの導入と基本的な使い方