Friday, November 09, 2007

resolv.conf and inetd and telnet and reverse dns

Interesting I recently had seen on a unix box after the resolv.conf was changed, telnet sessions were taking 20 seconds to initiate.

I told the unix guys to change the name servers for their machines as we were decommissioning a dns name server. After they made the change name resolution was working as expected, however there was a 20 second delay for telnet sessions and rlogon sessions. I was able to connect via ssh without a delay. I went to troubleshoot dns with nslookup and found the expected results without delay.

My first question was how do you get unix to re-read the manually edited resolv.conf - answer is the file is read on each dns request - most unix systems I have read about linux, freebsd, and hpux all are configured like this. The idea is the operating file system cache will have the file in memory and the file is quite small. So it is true that it is read on each request.

So telnet was configured to be called from inetd, the answer for this was to restart the inet daemon. I should state rather then a restart or reload, one of the admins had found many suggested simple killing and restarting the inetd deamon.

Friday, October 12, 2007

Tuesday, September 11, 2007


I just signed up for this website, ajaxWindows another webos - seems pretty impressive so far. I just saw the slashdot posting on it.

the cons - mainly security, may not be available from "every" machine I touch.
the pros - a quick way to be able to browse the web and save notes on most machines I touch.

Here is the YouTube video demo of the site/service

they also recommend and let you open a gmail account for online storage, cool.


Thursday, August 23, 2007

Getting Started with DD-WRT

A friend asked me how about getting started with DD-WRT, so here is the list:

Step 1: See if your device is supported

Step 2: Read up

Here is a link to the forums

Step 3: Download

Step 4:
Look at some Tutorials

Step 5:
Why he was interested in dd-wrt is the ability to use ssh tunnels with Putty, here are the links for that.


Tunneling VNC over SSH with PuTTY

Wednesday, August 08, 2007

Making ScITE even better - Part 1

Things I want in my ScITE
code complete
code snippents

CentOS5 running VMware Server

this page was helpful -

I didn't have to load the any-any vmware patch??

[root@BOX ~]# uname -r

Friday, August 03, 2007

Openssl tips and tricks

convert an apache type ssl cert to IIS:

openssl pkcs12 -export -in myssl.crt -inkey myssl.key -out myssl.p12

you will be prompted for the password.

Friday, July 20, 2007

perl files under subversion with keywords

To set keywords for all files, (well only for those under version control)
"c:\Program Files\svn-win32-1.4.2\bin\svn.exe" ps svn:keywords "URL Rev Author Date Id" *.*

Then add the following to your perl file:

#/* $URL$
# $Rev$
# $Author$
# $Date$
# $Id$

I know there is a way to change this to be default behavior, maybe I think.

vbscript top get modification date of file

'cscript getmoddate.vbs filename
'output filename#datemodified

Set filesys = CreateObject("Scripting.FileSystemObject")
Set demofile = filesys.GetFile(strFilename)
wscript.echo strFilename & "#" & demofile.DateLastModified

Wednesday, July 11, 2007

Map WebDAV folder as drive letter under XP

net use * password /user:domainname\username

found this should work great for those sharepoint sites as well.

I wish I didn't need to use sharepoint.

Thursday, June 28, 2007

use perl and forget sed

perl one liner that will replace all strings in a text file.

perl -pi -e "s/searchForText/replacewithThis/g;" *.txt

ok, the above sucks but it was what I found before.

Here is what is needed
perl -pi.bak -e "s/searchForText/replacewithThis/g" testf.txt

tested on 5.8 win32 - from activestate

Monday, June 18, 2007

Great collection of Windows VBScripts

I found a great collection of scripts, this covers some things the scripting guys miss.

I found under the networking section two dns scripts that I found helpful.

Wednesday, June 06, 2007

GTD - a new d3 is on the way

I started playing with GTD, I checked out MonkeyGTD and d3, as well as others (one with a Ruby on Rails backend).

I like d3 for the simpleness, however there are some things I would look at changing.

Google Group Discussion

I want to get to a point where GTD is my main area for journal, tasks, project list, etc.

Some things I want to add:
checkbox for common tags such as estimated time,15min, 20min.

Also I want to customize the RSS options as there are pocketmod templates which can read rss.

Wednesday, May 09, 2007


PocketMod is a great tool

There is an easy way to add items to pocket mod offline version.

Here is a page a lot of useful pocket mods.

Here is anther page:

And a third - lots of cool calendar stuff:

Tuesday, May 01, 2007

make your vhd files smaller

Virtual Server and Virtual PC make use of VHD files, here is a link to a MS KB also the basic steps on making them smaller.

check ms kb note -
1. run defrag
2. Virtual Disk Precompactor tool The Virtual Disk Precompactor tool is available in Microsoft Virtual PC 2004 Service Pack 1 (SP1).
3. for virtual server virtual disk menu on the master screen selected inspect.
4. click compact vhd (virtual guest must be offline for this to run.)

I am going to attempt to script part or all of this.

Thursday, April 12, 2007

Kick Butt way to save / restore / change NTFS permissions

The command line options took a bit to figure out but it was much better then cacls.exe and it also lets you backup and restore the permissions.

Saturday, February 10, 2007

Setting time on 4.5.x BIG IP 520 units

After installing the Daylight Savings Time patch for some F5....
Had some issues with the clocks being off an hour on two BigIP 520 units, F5 has a complex solution of booting into single user mode (these are based on BSD) to change the clock. I found what worked without booting into single user mode was changing the time zone to GMT then setting it back. I did this while the unit I was working on was in standby. Also another F5 tech note said to look at the redundant properties screen and to disable the gateway failsafe (that was not enabled for me anyway.)

"ntpdc" - this is the interactive mode
then "peers" - shows clocks of the time servers you configured.

Thursday, January 25, 2007

Windows NT XP 2003 DOS Batch Get Date as Variables

I use the following dos batch file, this is helpful when generating log files, that you want time stamped.

rem works with windows 2003 and xp
@echo off
for /f "tokens=1-4 delims=/ " %%a in ('date /t') do (set weekday=%%a& set month=%%b& set day=%%c& set year=%%d)

echo day = %day%
echo month = %month%
echo year = %year%

echo %year%%month%%day%