The Mad Philosopher » ssh keep-alive tip

The Mad Philosopher » ssh keep-alive tip
ssh keep-alive tip

Whenever I login remotely to my machine in Canada, the ssh session dies after a while if I don’t actively type something. This is not the server timing out, but rather the TCP connection hanging. Figuring out a way to keep sending it keystrokes automatically is beyond my ability, but I found out that I could just have it send me data continually, and that works just as well to keep the terminal session alive. The following Bourne Shell loop works:

> while date ; do sleep 10 ; done

This just prints the date and time to my terminal every 10 seconds. At any time, I can interrupt it with a CTRL-C and continue to use the session. So now you know.

The Power of GIT | Innovation On The Run

The Power of GIT | Innovation On The Run
Started working with git for the first time last week and I am really impressed at how powerful the tool is.  I’ve been interested in using a distributed version control system like git, darcs, or mercurial for a while, but I have been turned off on actually making the move because of the lack of integration with these version control systems and other software (bug tracking, automated build software, etc.).  Also, as a manager, I did not want to have to retrain a whole team of developers on a new version control system.
But enter git-svn which allows me to use git locally and Subversion for the distributed repository.  So now I get the best of both worlds, I can make my local branches and commits, but I don’t have to retrain my team or worry about integration as we still have all of the Subversion interfaces for interacting with the repository.

LyraTechnicalSystems.com » Blog Archive » Moving the Unmovable: Windows Disk Defragmentation Strategies

LyraTechnicalSystems.com » Blog Archive » Moving the Unmovable: Windows Disk Defragmentation Strategies
One problem you may encounter in using the Windows Defragmenter program is “unmovable files” (the green bars) placed in an inconvenient location (on the right side of the display, at the end of your disk). The two most common “unmovable” files are the Windows operating system paging file (pagefile.sys) and the hibernation file (hiberfil.sys) that is used to store system state when the XP operating system goes into “hibernate” mode. An easy solution is to temporarily remove these files, then reinstall them after you’ve resized the NTFS partition.

To temporarily remove pagefile.sys, open the Windows Start menu, right click on MyComputer, select Properties, the Advanced tab, the Performance Settings button, the Advanced tab, and the Virtual Memory Change button (on some versions of XP, you’ll click a Settings button in the Performance box, then click the Advanced tab) . Change the virtual memory size to 0 and click OK to save your changes (select “No paging file” and click Set then OK on some XP versions).
To temporarily remove hiberfil.sys, go to the Windows Control Panel, select Power Options, click the Hibernate tab, and unselect “Enable Hibernation.”

After performing these steps, reboot your system and rerun the Windows Defragmenter. You should no longer see any “unmovable” files, and the final defragmentation result will be much better.
If you’re lucky, preparing your NTFS for resizing will be no more challenging than this. However, when I converted my HP Pavilion desktop to a dual-boot XP/Linux system, preparing the disk for repartitioning was considerably more complicated, and could not be accomplished using only the Windows Defragmenter. There, I had to cope with a Master File Table (MTF) disk area and many boot-related files that were located at the end of the disk. The Windows Defragmenter cannot move these files. To complete the necessary defragmentation I downloaded a trial version of Raxco Software’s PerfectDisk. It proved capable of defragmenting the disk in entirety, though to do this it had to perform a boot time run where it moved the scattered boot fragments from the end to the start of the disk before allowing XP to boot.

Last but not least, remember to reinstall virtual memory (a pagefile.sys file) and, possibly, the hibernation option (hiberfil.sys) after your defragmentation has completed.

Follow

Get every new post delivered to your Inbox.