Episodes
Monday Apr 21, 2014
Thursday Mar 29, 2012
check_smartmon_ad12 NRPE: Unable to read output
Thursday Mar 29, 2012
Thursday Mar 29, 2012
Get following error when run /usr/local/libexec/nagios/check_nrpe2 -H 10.10.10.1 -c check_smartmon_ad12 NRPE: Unable to read output http://www.freebsddiary.org/nrpe-unable-to-read-output-followup.php
Wednesday Jan 30, 2008
How to Install Adobe Reader 8.1.1 on Debian Linux
Wednesday Jan 30, 2008
Wednesday Jan 30, 2008
First you need to download Adobe Reader 8.1.1 from here or here Now you have AdobeReader_enu-8.1.1-1.i386.deb package you need to install this .deb package using the following command #dpkg -i AdobeReader_enu-8.1.1-1.i386.deb
Tuesday Jan 22, 2008
set up debian autofs
Tuesday Jan 22, 2008
Tuesday Jan 22, 2008
1. #apt-get install autofs cat /proc/mounts // to check the current mounting situation, mount a mount point/device twice will fail edit /etc/auto.master /home/myfolder /etc/auto.myfolder --timeout=60 vim /etc/auto.myfolder * -rw,intr,rsize=32768,wsize=32768,tcp server:/home/myfolder/& /etc/init.d/autofs restart
Wednesday Jan 02, 2008
Zune install error XML Lite couldn't be found
Wednesday Jan 02, 2008
Wednesday Jan 02, 2008
When I tried to install Zune on my XP, I keep getting the error: Installation Media Not found, The meida for installation package 'XML Lite' couldn't be found, it might be incomplete ot corrupt Error code: 0x80070002 To solve the problem, download 'XML Lite' from Microsoft site After I installed the XMLLite, the error goes away.
Wednesday Nov 28, 2007
set linux boot processes with chkconfig
Wednesday Nov 28, 2007
Wednesday Nov 28, 2007
The chkconfig command generates and breaks links between the directory /etc/rc.d/init.d/ and the appropriate run level directory: /etc/rc.d/rc[0-6].d/ to control boot process initiation and process shutdown.
chkconfig [--level ] on | off | reset > chkconfig --list chkconfig --list chkconfig --add chkconfig --del chkconfig --level 0123456 offExamples:
- chkconfig --level 345 httpd on - forces apache to be invoked for run levels 3, 4 and 5.
- chkconfig --add httpd - Start the web server daemon upon system boot.
- chkconfig --del sendmail - Do not start the sendmail daemon upon system boot.
- chkconfig --list - List all services and init levels.
- chkconfig --list | grep on - List all services to be started upon system boot.
- chkconfig wu-ftpd on - Turn on FTP service managed by xinetd.
- chkconfig ipop3 off - Turn off POP3 service managed by xinetd.
Tuesday Nov 27, 2007
Install python-mysql ZMySQLDA for zope plone
Tuesday Nov 27, 2007
Tuesday Nov 27, 2007
After I installed plone for my Suse 10.2, I found the python-mysql, ZMySQLDA are not there. It turns out the plone 3 and zope 2.10 only supports Python 2.4, thus I download python-mysql rpm for python2.4 at ftp://rpmfind.net/linux/SuSE-Linux/i386/9.3/suse/i586/python-mysql-1.2.0-3.i586.rpm $ sudo rpm -ivh python-mysql-1.2.0-3.i586.rpm The above will install the package to default location /usr/lib . $rpm -ql python-mysql-1.2.0-3 This will tell you what installed by this rpm. Just copy things to the zope instance folder /opt/python24/lib/python2.4/site-packages/ $sudo cp -r /usr/local/lib/python2.4/site-packages/MySQLdb /opt/python24/lib/python2.4/site-packages/ $sudo cp /usr/local/lib/python2.4/site-packages/_mysql.so /opt/python24/lib/python2.4/site-packages/ $sudo cp /usr/local/lib/python2.4/site-packages/_mysql_exceptions.py /opt/python24/lib/python2.4/site-packages/ $sudo cp /usr/local/lib/python2.4/site-packages/_mysql_exceptions.pyc /opt/python24/lib/python2.4/site-packages/ Try to import _mysql in python $python2.4 >>>import _mysql It should give you no error. $tar -xzvf ZMySQLDA-2.0.8.tar.gz Files will be untared to ./lib/python/Products/ZMySQLDA/ $sudo cp -r ./lib/python/Products/ZMySQLDA /var/opt/zope/default/Products Restart zope: sudo rczope restart You should be able to see ZMySQLDA in Zope now.
Friday Sep 14, 2007
Ruby special variables
Friday Sep 14, 2007
Friday Sep 14, 2007
There is a collection of special variables whose names consist of a dollar sign ($
) followed by a single character. For example, $$
contains the process id of the ruby interpreter, and is read-only.
$ |
global variable |
@ |
instance variable |
[a-z] or _ |
local variable |
[A-Z] |
constant |
$! |
latest error message |
$@ |
location of error |
$_ |
string last read by gets |
$. |
line number last read by interpreter |
$& |
string last matched by regexp |
$~ |
the last regexp match, as an array of subexpressions |
$ n |
the nth subexpression in the last match (same as $~[ n] ) |
$= |
case-insensitivity flag |
$/ |
input record separator |
$\ |
output record separator |
$0 |
the name of the ruby script file |
$* |
the command line arguments |
$$ |
interpreter's process ID |
$? |
exit status of last executed child process |
$_
and $~
have local scope. Their names suggest they should be global, but they are much more useful this way, and there are historical reasons for using these names.Friday Sep 14, 2007
how to start learning Ruby
Friday Sep 14, 2007
Friday Sep 14, 2007
The best place to start learning Ruby is to read the Ruby User's Guide which is originally written by the Ruby creator Matz and translated by Mark Slagell Alternatively, there is a free Ruby book -- Programming Ruby (The Pragmatic Programmer's Guide)
Friday Jun 22, 2007
Install localhost Subversion server on windows
Friday Jun 22, 2007
Friday Jun 22, 2007
A good tutorial can be find at here To make subversion run as service, find the instructions at http://svn.collab.net/repos/svn/trunk/notes/windows-service.txt The sc create command I used is: sc create svnserver binPath= ""c:program filessubversioninsvnserve.exe " -- service --root f:svnRepository" DisplayName= "SVN" depend= "Tcpip" Notice the option name, such as binPath must be connect with = . No space is allowed between binPath and =, but a space must be after =, Thus it must be : binPath= "something", otherwise get the error message.