pic 07月 5th, 2009

screenshot

perldoc -q “insert a line” 07月 4th, 2009

perldoc -q "insert a line"
Found in /usr/share/perl/5.10/pod/perlfaq5.pod
How do I change, delete, or insert a line in a file, or append to the beginning of a
file?
(contributed by brian d foy)

The basic idea of inserting, changing, or deleting a line from a text file
involves reading and printing the file to the point you want to make the change,
making the change, then reading and printing the rest of the file. Perl doesn’t
provide random access to lines (especially since the record input separator, $/,
is mutable), although modules such as "Tie::File" can fake it.

整理2个opera的alias, 专门找缓冲区视频的。 06月 30th, 2009

alias find-opera-1M='find ~/.opera/cache*/ -cmin -15 -size +1000k -exec echo "----------" \; -exec ls -l {} \; -exec file {} \;'
alias find-opera-swf='find ~/.opera/cache*/ -cmin -15 -exec file {} \; |g "Flash"'

恢复旧decor 06月 25th, 2009

fvwm-decor

鼠标滚轮换壁纸 06月 23rd, 2009

#!/usr/bin/perl

$wpdir="$ENV{HOME}/媒体/●壁纸/1280x800及以上/";
$wpconf="$ENV{HOME}/.desktop-pic-roll.rc";
$cur=`cat $wpconf`;chomp $cur;print "当前:$cur\n";
$num=-1;
chdir $wpdir;@jpg=glob "*.jpg";
for (0 .. $#jpg){
if($jpg[$_]=~/^$cur$/){
if($ARGV[0]){ #逆向
$num=$_-1;if($num<0){$num=$#jpg;}
}
else{
$num=$_+1;if($num>$#jpg){$num=0;}
}
last;
}
}
if($num<0){$num=0;}
print "新选:==$num==$jpg[$num]==\n";
`echo $jpg[$num]>$wpconf`;
`habak \'$wpdir$jpg[$num]\'`;

Mouse 4 R A Exec exec ~/应用/脚本/roll-wallpaper.pl
Mouse 5 R A Exec exec ~/应用/脚本/roll-wallpaper.pl 1

exp.fvwm.2009-06-22.tar.gz 06月 22nd, 2009

37k 放到论坛ftp了。

Xephyr 06月 22nd, 2009

☎ Xephyr :1
☎ DISPLAY=:1 rox

鸣学 06月 19th, 2009

crontab 啊 05月 22nd, 2009

这么多年了,才发现没看过man 5 crontab
可以设置路径的哦。
可以设置用户的哦。
☎ cl
# m h dom mon dow command
SHELL=/bin/bash
PATH=/home/exp/应用/脚本/:/usr/local/bin:/bin:/usr/bin
*/30 * * * * msg 抽烟了,其他时间禁止吸烟。
50 17 * * 1-5 msg 下班了。
0 21 * * * msg 记账。

永中的字体 05月 21st, 2009

新安装一个/home/exp/安装/EIO2009_Trial_ZH_Lin.tar.gz
结果jre字体都不设置,都方块。
/usr/local/Evermore/EIOffice/Jre/lib/fonts/fallback
☎ sudo ln -s /usr/share/fonts/zh_CN/TrueType/* .
居然要自己链接字体。