Archive for the 'Tips' Category


SiteBar and “Recently Added”, “Recently Visited” and “Most Visited” virtual folders 0

As I have mentioned in the past, I have moved from Spurl to SiteBar for my bookmark management. I host SiteBar on my own server. Generally, I am very happy with it.

I have quite a hierarchical tree of my links in SiteBar. However, one piece of functionality that I missed a lot in SiteBar compared to Spurl, was the ability to see and click on URLs that I recently visited, or recently added, or that I visit the most often. I had this on my TODO list for eons.

At the same time, after my move to Kaspersky Lab, I wanted to check how easy it is to work with PHP compared to Perl. At the same time, having the abovementioned functionality became very important as well. So I thought: why not combine the two together, and add missing functionality to SiteBar, while exploring PHP a bit further for work purposes?

So here you go: the result of around 1 hour of poking around SiteBar and PHP. Here is how to use it:

  1. Replace your “/var/www/your-site/sitebar/inc/tree.inc.php with the downloaded from here (of course, it’d make sense to backup your old one, just in case)
  2. In your SiteBar, go to “Maintain Trees”, then create the following 5 trees (or less, if you don’t need all the functionality; the names and case are important):
    1. Recently Added” – for recently added URLs
    2. Recently Visited” – for recently visited URLs
    3. Most Visited” – for most visited URLs
    4. Dead” – for dead links
    5. Unverified” – for those links that haven’t been checked
  3. After you do that, every folder of those is going to display top 30 relevant links in your whole collection

So hopefully someone else also finds it useful. Have fun!

P.S. By the way, yes, my opinion is that PHP is as easy as Perl, and implies a more structured approach and, therefore, a tiny bit easier to read.

Installing Bookmarklets or Internet Explorer Bars 0

Just to be clear, my previous post “Spurl on Vista 64-bit” is applicable to any bookmarklets/explorer bars, not only Spurl. For example, I recently moved from Spurl to SiteBar hosted on my own server, and I had the sample problem as with Spurl. Applying the trick sorts out the problem.

PuTTY for Windows and ssh:// handler 19

I use PuTTY for Windows a lot. It is an excellent SSH, Telnet, etc, etc, terminal program.

On the other hand, I am very impatient user. I honestly believe that the users should never wait for computers, and that the letters should appear on the screen a microsecond before the user types them. This means that I hate moving my hands away from the keyboard to mouse to use a GUI interface, when the majority of work is actually typing text or code on the keyboard. This defines a lot of choices I make when selecting software on my computer.

Bundled together, I really do not appreciate opening PuTTY GUI interface just to double-click on some PuTTY profile and then move the hand back on the keyboard. A much faster way of doing this for me is to press “Win-R”, type in something along the lines of “ssh://myhost.com” and never move away from the keyboard. After a couple of Google searches, I know I am not alone in that. At least one of my colleagues prefers to do it this way as well. Speeds things up a lot, believe me.

The problem is that PuTTY does not support it. It supports telnet://192.168.0.1, but NOT ssh://192.168.0.1. Apparently, this is because PuTTY developers believe that the URL convention for SSH protocol hasn’t been approved yet and, therefore, PuTTY won’t support it. Some people even developed special tool – UrlConf – in particular, to be able to set up PuTTY as a default ssh:// handler. Some others use Windows batch files to parse command line passed to PuTTY and run it.

Both solutions are somewhat funny – they invoke a proxy application just to invoke PuTTY. As PuTTY is Open source distributed under MIT license, why don’t I update its source code to do what I need?

So here it is, PuTTY that can handle not only ssh:// protocol to the same extent it could handle telnet:// protocol, but also handles a special putty:// protocol.

CONTENT:

  1. putty.exe – compiled putty.exe with the additional features
  2. putty.reg – Windows Registry file to register putty.exe to handle telnet, ssh and putty protocols
  3. unputty.reg – Windows Registry file to unregister putty.exe from the system
  4. window.c – the only file that had to change to implement extra functionality – for your reference only, you don’t need to do anything about it
  5. diff.txt – the diff file for window.c file – for your reference only, you don’t need to do anything about it
  6. readme.txt – the file with information about this package

INSTALLATION:

  1. Put putty.exe into the directory where your current putty.exe resides
  2. Edit putty.reg to replace path to putty.exe with your path
  3. Merge putty.reg with your registry (usually, by double-clicking)
  4. Enjoy!

UNINSTALLATION:

  1. Run unputty.reg
  2. Enjoy!

CHANGELOG:

[*] Based off the source code for the latest Windows development version as of 14/09/2008

[+] Handles ssh:// protocol to the same extent as it handles telnet:// protocol. Namely, if you type something like “ssh://192.168.0.1″, and 192.168.0.1 runs SSH server, PuTTY would attempt to connect

[+] Handles putty:// protocol. This is a special protocol and, if invoked as “putty://profile-name”, would be equivalent to “putty.exe -load profile-name”. In other words, if you have profile-name defined in PuTTY, then typing “putty://profile-name” in Run menu or in browser, would invoke PuTTY, load profile-name and attempt to connect using its settings. If the profile contains spaces in it, please, put it in quotes: “putty://”profile name”"

Download the zip file here: putty_ssh

Have fun, folks!

Sharing printers on Vista 64-bit 3

Recently I purchased a new computer to replace my main Windows box at home. It is brilliant – Quad Core, 4Gb of memory, 300 Gb of RAID0 on 10k Raptors, NVIDIA SLI. Naturally, this hardware required Windows Vista 64-bit - if for nothing else, then to use the full 4Gb of memory. There were loads of issues I discovered when trying to set it up. Here is one of them.

 I have a number of other computers. My main Windows desktop serves as a “print server” – i.e., it shares a printer to the rest of the network. It is HP LaserJet 1020. And that’s where the problem comes from. You see, it prints fine from the computer which it is connected to. But remote jobs do not print unless you stop and start the Print Spooler service again. After a fair bit of research, I found out that essentially, doing these three things solves the problem:

  1.  Disable bidirectional support for your printer in its properties:Disable bidirectional support
  2. In your Group Policy Object Editor, in “Local Computer Policy\Computer Configuration\Administrative Templates\Printers” enable “Allow Print Spooler to accept client connections” (yes, I know it is not easy to find Group Policy Object Editor – see below how to do so):GPO Print Spooler
  3. In your Group Policy Object Editor, in “Local Computer Policy\User Configuration\Administrative Templates\Control Panel\Printers” disable “Point and Print Restrictions”:GPO Point and Print

This solution seems to work fine and enables the network computers to use shared printers on Windows Vista 64-bit… Although there is still a glitch: because you disabled “Bidirectional Support”, that means that the printer cannot communicate back its response to the computer. The result is that if you need to print on a special type of paper (i.e., envelopes or mail labels), your printer cannot request the spooler to show a dialog to display “please, insert special paper” message. Enabling back bidirectional support solves this issue – but then the other computers on the network cannot print. I do not know any solutions to this problem. If you know of any – welcome to comments!

Now, here is how to get to Group Policy Object Editor:

  1. Start mmc.exe from your Run prompt
  2. Press Ctrl-M; you should now see a dialog to choose which snap-ins you want to use:GPO MMC
  3. If you double-click it and accept default settings, that’s it – your GPO Editor is up and running.

I do hope this helps those who struggle with their printers on Vista sort out printing problems.

Spurl on Vista 64-bit 1

For those of you who, like myself, like online bookmark site Spurl, and could not get the Explorer Bar to show on Widndows Vista 64-bit, here is a simple way to do so:

  1. Check which Internet Explorer you are running. I did so by looking at Windows Task Manager and looking for ieuser.exe and iexplore.exe processes. In my case, they had “*32″ marks next to it to indicate that it is 32-bit processes: Internet Explorer Bitness
  2. Open a 32-bit RegEdit by typing “c:\windows\SysWOW64\regedit.exe
  3. In that editor, navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Discardable\PostSetup\Component Categories:
    Reset IE Cache
  4. Delete keys named {00021493-0000-0000-C000-000000000046} and {00021494-0000-0000-C000-000000000046}

This will force IE to rebuild its cache of Explorer Bars to load and, in my case, made Spurl show up nicely as a sidebar in IE.