This file contains 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
https://btrfs.wiki.kernel.org/index.php/Getting_started | |
https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices | |
% echo 'deb http://backports.debian.org/debian-backports squeeze-backports main' > /etc/apt/sources.list.d/backports.list | |
% sudo apt-get update | |
% sudo apt-get -t squeeze-backports install linux-image-2.6-amd64 | |
% sudo apt-get install btrfs-tools | |
% sudo /sbin/shurdown -r now | |
% sudo mkfs.btrfs -m raid0 /dev/sdb /dev/sdc |
This file contains 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/sh | |
virt-install \ | |
--connect="qemu:///system" \ | |
--name="squeeze-amd64" \ | |
--ram=8192 \ | |
--location="http://ftp.jp.debian.org/debian/dists/squeeze/main/installer-amd64/" \ | |
--disk path=/var/lib/libvirt/images/squeeze-amd64.img,size=32 \ | |
--network bridge=br0,model=virtio \ | |
--vnc \ | |
--vnclisten=0.0.0.0 |
This file contains 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/sh | |
virt-install \ | |
--connect="qemu:///system" \ | |
--name="lenny-i386" \ | |
--ram=4096 \ | |
--cdrom="/path/to/debian-5010-i386-netinst.iso" \ | |
--disk path=/var/lib/libvirt/images/lenny-i386.img,size=32 \ | |
--network bridge=br0,model=virtio \ | |
--vnc \ | |
--vnclisten=0.0.0.0 |
This file contains 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/sh | |
size=9348 | |
count=10 | |
tmpname="500mb.tiff" | |
for i in `jot - 1 $count`; do | |
convert -size ${size}x${size} xc: +noise Random $tmpname | |
ofname=`md5 -q $tmpname`'.tiff' | |
mv $tmpname $ofname | |
done |
This file contains 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/sh | |
user="viz" | |
group="$user" | |
current_uid="502" | |
uid="60001" | |
gid="$uid" | |
dscl . -create /Groups/$group PrimaryGroupID $gid | |
dscl . -create /Users/$user UniqueID $uid | |
dscl . -create /Users/$user PrimaryGroupID $gid | |
find / -user $current_uid | xargs chown -R $uid:$gid |
This file contains 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
sudo mount -t nfs -o rsize=8192,wsize=8192,resvport fs:/home /fs |
This file contains 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
--- twittering-mode.el 2012-03-13 10:31:55.864538007 +0900 | |
+++ /home/viz/.emacs.d/site-lisp/twittering-mode.el 2012-03-13 10:34:19.823969274 +0900 | |
@@ -8112,6 +8112,7 @@ | |
(define-key km (kbd "C-c C-r") 'twittering-replies-timeline) | |
(define-key km (kbd "C-c C-u") 'twittering-user-timeline) | |
(define-key km (kbd "C-c C-d") 'twittering-direct-messages-timeline) | |
+ (define-key km (kbd "C-c C-w") 'twittering-sent-direct-messages-timeline) | |
(define-key km (kbd "C-c C-s") 'twittering-update-status-interactive) | |
(define-key km (kbd "C-c C-e") 'twittering-erase-old-statuses) | |
(define-key km (kbd "C-c C-m") 'twittering-retweet) |
This file contains 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/sh | |
# | |
# Setup ZFS raidz1 based FreeBSD | |
# http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/RAIDZ1 | |
# Create virtual disk image on host OS before installation. | |
# VBoxManage createhd --filename freebsd-zfs0.vdi --size 32768 | |
# VBoxManage createhd --filename freebsd-zfs1.vdi --size 32768 | |
# VBoxManage createhd --filename freebsd-zfs2.vdi --size 32768 |
This file contains 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/sh | |
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir="/Users/viz3/Library/Application Support/Google/Chrome/viz3.dev" --user-agent="Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_5 like Mac OS X; ja-jp) AppleWebKit/533.17.9 (KHTML, like Gecko) Mobile/8L1" |
This file contains 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
#!/usr/bin/env ruby | |
def run | |
ipaddr_list = [] | |
(1..254).each { |n| ipaddr_list << '192.168.0.' + n.to_s } | |
h = {} | |
ipaddr_list.each do |ipaddr| | |
h[ipaddr] = Thread.new do | |
`ping -c 1 #{ipaddr} > /dev/null` |