腊八蒜绿了
今天发现,前天才腌的腊八蒜竟然有几瓣绿了。按说不会那么快的呀。
而且放腊八蒜的地方离暖气很远,靠近阳台门,温度相对比较低的。
继续观测…
今天摆弄起dia来,用它画UML。但是光画成UML,不能导出生成代码,仍然是个痛苦的事情。
为此想用umbrello来着,可是我用的 桌面环境,不支持KDE,无法安装umbrello。只好作罢。
找到uml2php,能够将dia生成PHP代码。遗憾的是只有LINUX版本。 后来找到了dia2code这个好东西。他支持导出多种代码。
# dia2code
dia2code version 0.8.2, Copyright (C) 2000-2001 Javier O'Hara
Dia2Code comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; read the COPYING file for details.
Usage: dia2code [-h|--help] [-d <dir>] [-nc] [-cl <classlist>]
[-t (ada|c|cpp|idl|java|php|php5|python|shp|sql|csharp)] [-v]
[-l <license file>] [-ini <initialization file>]<diagramfile>
# dia2code -t php test.dia
自从在巧儿家吃过腊八蒜后,就喜欢上腊八蒜了。
墨绿色,吃起来有些辣,有些甜。
去年腌的腊八蒜早就吃完了,一直等着今年的腊八来临。可惜昨天忘记是腊八了, 因而没有买蒜,也就没有腌成。
今天已经是初九,将就将就吧。呵呵
今天到超市买了几斤大蒜,回家后剥皮,冲洗,腌制。挺好玩的。
后来google搜索了下,很多朋友都是如此说。虽然可以买得到,但是自己腌制的过程很有乐趣。甚至很多朋友说,腌蒜带来了许多小时候的回忆。
http://www.nongnu.org/gcmd/keys.html
Keyboard mapping for GNOME Commander v1.2----------------------------------------- F1 HelpF2 Refresh files in the active file listF3 View filesF4 Edit filesF5 Copy filesF6 Rename or move filesF7 Create directoryF8 Delete filesF9 SearchF10 Quit ALT+1 Change left connectionALT+2 Change right connection ALT+F3 View with external viewerALT+F7 SearchALT+F8 Open the history list for the command line SHIFT+F2 Compare directoriesSHIFT+F3 View with internal viewerSHIFT+F4 Edit a new fileSHIFT+F5 Make a copy a file in the current directorySHIFT+F6 Rename a fileSHIFT+F10 Bring up the context menu for the selected files CTRL+F3 Sort by nameCTRL+F4 Sort by extensionCTRL+F5 Sort by date/timeCTRL+F6 Sort by sizeCTRL+F7 Unsorted CTRL+SHIFT+F5 Create symbolic link = Select files using a patternNUM + Select files using a patternNUM - Unselect files using a patternNUM * Invert selectionNUM / Restore selectionCTRL+NUM + Select all filesCTRL+NUM - Unselect all filesCTRL+= Select all filesCTRL+- Unselect all filesALT+NUM + Select all files with the same extensionALT+NUM - Unselect all files with the same extension CTRL+A Select all filesCTRL+SHIFT+A Unselect all files INSERT Select file or directorySPACE Select file or directory (as INSERT). If SPACE is used on an unselected directory under the cursor, the contents in this directory are counted and the size is shown in the "full" view instead of the string <DIR> ALT+ENTER Show properties for the selected file ALT+SHIFT+ENTER The contents of all directories in the current directory are counted. The sizes of the directories are then shown in the "full" view instead of the string <DIR> BACKSPACE or LEFT or CTRL+PageUp Change to parent directory (cd ..) ENTER Change directory or execute command line if not emptySHIFT+ENTER Execute command line in the defined terminal and leaves the terminal window open RIGHT or CTRL+PageDown Change directory ALT+LEFT Go back to the last visited directoryALT+RIGHT Go forward to the next visited directory CTRL+ Go to the root directoryCTRL+` Go to the home directory DELETE Delete files CTRL+C Copy files to clipboard (not a global one yet)CTRL+X Cut files to clipboard (not a global one yet)CTRL+V Paste from clipboard to current dir (not a global one yet) CTRL+D Open favourite directories (bookmarks)CTRL+M Multi-Rename-ToolCTRL+T Multi-Rename-Tool TAB Switch between left and right file listCTRL+U Switch between left and right file listCTRL+. Copy the current working directory from the inactive file-list to the active oneCTRL+SHIFT+. Copy the current working directory from the active file-list to the inactive one CTRL+R Refresh the active file listCTRL+O Options dialogCTRL+SHIFT+H Toggle hidden files on/offCTRL+SHIFT+= Set both panels equal CTRL+G FTP Quick ConnectCTRL+F Connect to FTP serverCTRL+SHIFT+F Disconnect from FTP server ALT+Letter(s)CTRL+ALT+Letter(s) Quick search for a file name (starting with specified letter) in the current directory Letter Redirect to command line, cursor jumps to command lineESC Clear the command line CTRL+K Delete to the end of lineCTRL+W Delete the word to the left of the cursorCTRL+T Delete the word to the right of the cursor CTRL+P Add the full path of the current directory to the command line CTRL+ENTER Add the file name under the cursor in the source directory to the end of the command line CTRL+SHIFT+ENTER Add the file name under the cursor including its path to the end of the command line CTRL+DOWN or ALT+F8 A list with the latest command lines (history list) is opened. Use the UP and DOWN cursor keys to select an entry. By pressing the LEFT or RIGHT key, you can edit the command line. This automatically closes the list
有很多Apache的虚拟主机,若要我一个一个的转换成为Lighttpd的虚拟主机,那太痛苦了。
于是用PHP写成这个小程序。
[code]#! /usr/local/bin/php -qn" ; echo "Example: " . $argv[0] . " myvhost.confn" ; echo "Output to file: " . $argv[0] . " myvhost.conf > /tmp/lighttpd_myvhost.confn" ; echo "Author: 16hotn"; echo "Home: http://16hot.blog.isyi.comn"; echo "n" ; exit ;}$AVhostValue = file( $AVhost );for( $i = 0; $i ", $AVhostLine ) ) { $vhostHeader = "#### user:## site:## date: ". date("Y-m-d") ."## admin: 16hot##n" ; echo $vhostHeader, "n" ; } if ( ereg( "^ServerName", $AVhostLine ) ) { $domain = explode( " ", $AVhostLine ); echo "$HTTP["host"] == "" . $domain[1] . "" {n" ; echo " server.name = "" . $domain[1] . ""n" ; } if ( ereg( "^ServerAlias", $AVhostLine ) ) { $aliasDomain = explode( " ", $AVhostLine ); echo " # "; for( $j = 1; $j ", $AVhostLine ) ) { echo " #server.errorlog = "/var/log/httpd/" . $domain[1] . "-error.log"n" ; echo " #accesslog.filename = "/var/log/httpd/" . $domain[1] . "-access.log"n" ; echo "}nnn" ; } } // end for?>[/code]
是使用md5命令,生成md5码,然后截取指定位数作为密码。用于用户密码,不如系统用户,mysql用户等。
#! /bin/sh
# build md5 password
# http://16hot.blog.isyi.com
# 16hot
# 2006-12-31
# $Id: genpw.sh 435 2006-12-31 03:47:55Z 16hot $ROUND=”YES” ;
SCRIPTNAME=”genpw.sh” ;
MD5=”/sbin/md5″ ;
AWK=”/usr/bin/awk” ;
CUT=”/usr/bin/cut” ;if [ "$1" = "" ] ; then
echo ;
echo “Syntax: $SCRIPTNAME <key> [length]” ;
echo “Example: ./$SCRIPTNAME my’spassword” ;
echo “Author: 16hot ” ;
echo “Home: http://16hot.blog.isyi.com”;
echo ;
exit ;
else
KEY=”$1″ ;
fi ;if [ "$2" = "" ] ; then
LEN=”16″ ;
elsetest $2 -gt 5 -a $2 -lt 33 2>/dev/null
if [ "$?" != "0" ] ; then
echo ;
echo “The password length must between 6 and 32″ ;
echo “set to default length: 16″ ;
#echo ;
LEN=”16″;
else
LEN=”$2″ ;
fi ;
fi ;if [ ! -x ${MD5} ] ; then
echo ;
echo “md5 command not found!” ;
echo “Please setup MD5!” ;
echo ;
exit ;
fi ;if [ ! -x ${AWK} ] ; then
echo ;
echo “awk command not found!” ;
echo “Please install awk and setup AWK” ;
echo ;
exit ;
fi ;if [ ! -x ${CUT} ] ; then
echo ;
echo “cut command not found!” ;
echo “Please install cut and setup CUT” ;
echo ;
exit ;
fi ;if [ "${ROUND}" = "YES" ] ; then
NewKey=”${KEY}-genpw-`date +%Y%m%d%H%M%S`” ;
else
NewKey=”${KEY}-genpw” ;
fi ;#echo ${KEY};
#echo ${NewKey};## Get OS’s name
OS=”`uname -s`”;## becuse the diffent OS’s md5 program have diffrent
##
if [ "${OS}" = "FreeBSD" ] ; then
PW=`${MD5} -s “${NewKey}” | awk -F= ‘{print $2}’ | awk ‘{print $1}’ | ${CUT} -b1-${LEN}` ;
#PW=`${MD5} -s “${NewKey}”` ;
else
echo “Sorry !! only support FreeBSD now.” ;
exit ;
fi ;echo ;
echo “PW-${LEN}: { ${PW} }” ;
echo ;
echo “Author: 16hot ” ;
echo “Home: http://16hot.blog.isyi.com”;
echo ;
## end script
昨天看到一篇博客说gaim-2.0.0beta5直接支持qq了。
我也到posts里make了一个,果然直接就支持qq了,不需要另外再安装openq。
不过用户多个帐号登录方面,觉得不如1.5版的方便。
但是运行qq时,没有以前那么耗资源了。
之前为在X桌面上使用支持简体中文的终端而烦恼。rxvt只支持繁体,xterm支持也不好。
有段时间用Eterm,很不幸,刚安装好,可以使用。但是重启后,就不能使用了。懒得调试,还是找个好用,稳定些的吧。
于是跑到google上搜,别说摆渡了,怕了它。通过google,找到了mrxvt 。http://materm.sourceforge.net/
看说明对简体中文支持还是不错的。于是安装使用,感觉良好。下面介绍安装和配置方法。
安装:
# cd /usr/ports/x11/mrxvt-devel/
# make install clean
出现配置提示,我是全部都选择。
x x [X] XFT Enable Xft support for fonts x x
x x [X] BACKGROUND Enable background images x x
x x [X] JPEG Enable JPEG background images x x
x x [X] PNG Enable PNG background images x x
x x [X] TRANSPARENCY Enable transparency x x
x x [X] SWAPSCREEN Enable swapscreen x x
x x [X] JAPANESE Enable support for Japanese language x x
x x [X] 24BITS Prefer 24 bits color x x
x x [X] MENUBAR Enable menubar x x
x x [X] TEXTSHADOW Enable text shadow x x
x x [X] FRILLS Enable internal borders and smart resizing x x
编译安装完后,执行 rehash 一次。
然后配置 ~/.Xdefaults
# vi ~/.Xdefaults
将如下配置写入 .Xdefaults 文件就可以了。
mrxvt.borderColor: black
mrxvt.background: black
mrxvt.backspacekey: "^H"
mrxvt.cursorColor: IndianRed
mrxvt.foreground: gray98
mrxvt.geometry: 80×24
mrxvt.inputMethod: scim
mrxvt.multichar_encoding: GB2312
mrxvt.preeditType: OverTheSpot
mrxvt.scrollTtyKeypress: True
mrxvt.scrollTtyOutput: False
mrxvt.scrollBar_right: True
mrxvt.shading: 30
mrxvt.termName: xterm-color
mrxvt.transparent: True
mrxvt.transpscrollbar: True
mrxvt.troughColor: black
mrxvt.title: "ymm's term"
保存后,执行执行 # mrxvt 就可以看到终端了。
虽然会提示: mrxvt: Could not open file default.menu ,但是不用管它,并不影响使用。
最新评论