Archive for category Software

SSH Proxy

Did you know that OpenSSH includes function to act as a SOCKS4 and SOCKS5 host? (I didn’t)

It is as simple as creating a “Dynamic forwarded port” in PuTTY or using the -D switch with the SSH client.

Tunnelling just became a whole lot easier.

References

HOWTO: Secure Firefox and IM with PuTTY

Tags: , ,

Comparison of Twitter clients

Echofon

(formally known as Twitterfox)

Pros Cons
  • Easy to favourite, reply, retweet
  • Shortcut key for open and paste in current page’s url
  • Automatically shrinks urls
    Uses browser’s dictionary
  • Easy to open selected tweet’s owner’s page in browser
  • Compact user interface
  • Preview destination of short urls before clicking
  • Only loads subset of recent tweets, not all since last runtime
  • Seems to randomly switch between using bit.ly and tinyurl.com
  • Ugly theme since renaming to “Echofon”
  • No marking of posts as read

Tweetdeck

Pros Cons
  • Preview destination of shortened links before opening in browser
  • Can mark posts ‘read’
  • Fixed height for all tweets wastes precious screen space.
  • NO colourcoding of text (eg. links, usernames, etc)
  • Marking post ‘read’ only marks it in current tab
  • No smooth scrolling, scrolls item by item

Seesmic

Pros Cons
  • Different Tweet types are colourcoded (eg. messages, replies, ReTweets)
  • No checklist of current followed accounts, makes it tedious to create a list of friends – have to locate an existing tweet and then click ‘add to userlist’. (compared to how Tweetdeck does it)
  • Adding a user to a list will not bring over their existing tweets (unless you restart the program)
  • No marking of posts as read
  • No smooth scrolling, scrolls item by item

Peoplebrowsr

Pros Cons
  • Has web and desktop versions (thus far appear identical, and settings carry-over between them)
  • Can switch between Lite, Advanced, and Business modes.
  • Can show people’s @replies that are not directed at you
  • Marking a post as ‘read’ markes it in ALL tabs (and changes its colour)
  • Smooth scrolling
  • Preview the destination of short urls
  • Desktop App (Adobe Air) is buggy and slow

Tags: , , , , , ,

Deleting in Gmail IMAP

Getting “Delete” to work as expected in Gmail IMAP was surprisingly complicated.

The default action when a client deletes a message is to archive it (ie: move it to “All Mail”). I didn’t like this because then if I accessed the account from POP the deleted mail would still be downloaded.

Recommended IMAP settings tells you all the things NOT to do, but doesn’t give any useful advice on how to setup clients.

Eventually after trying many different settings I realised the simplest method was to tell the client to MOVE the message to the Gmail Trash folder when it is deleted. To do this in Thunderbird2 required manually editing the prefs.js file to specify a custom IMAP trash folder:

user_pref("mail.server.server#.trash_folder_name", "[Gmail]/Trash");

Note that the case of the trash folder name IS important.

Tags: , , ,

Disable WordPress Autosave

WordPress’ Autosave feature was getting on my nerves. Often I make several revisions of a page before I save and WordPress was saving intermediate drafts that I didn’t want to keep.

I was surprised to find that there is no option in WordPress core to disable Autosave. Thankfully though it is incredibly easy to disable through editing the source or creating a custom plugin.

The following code (take from the reference link below) will function as a WordPress plugin and will disable autosave (works in WordPress 2.8)

<?php
/*
Plugin Name: Disable Autosave
*/
function disable_autosave() {
wp_deregister_script('autosave');
}
add_action( 'wp_print_scripts', 'disable_autosave' );
?>

References

Adjust WordPress Autosave or Disable It Completely

Tags: ,

OpenSSH escape characters

SSH has tilde (~) as an escape character by default. Make sure that the last you typed in was nothing or a newline, then type one of the following sequences:

~. - terminate connection
~B - send a BREAK to the remote system
~C - open a command line
~R - Request rekey (SSH protocol 2 only)
~^Z - suspend ssh
~# - list forwarded connections
~& - background ssh (when waiting for connections to terminate)
~? - this message
~~ - send the escape character by typing it twice

References

OpenSSH Escape Characters
man page ssh(1)

Tags: ,

Safe reboot a crashed Linux

Originally seen here as Skinny Elephants, this sequence of keys allows you to safely reboot a Linux system that has blocked – avoiding hitting the reset button.

Raising Skinny Elephants Is Utterly Boring

Here is how you “raise the elephant”:

Alt+SysRq+r ( The LEFT Alt key ) ( SysRq is on the same button as print screen )
Alt+SysRq+s
Alt+SysRq+e
Alt+SysRq+i
Alt+SysRq+u
Alt+SysRq+b

Give a little time between keystrokes.

The r stands for put keyboard in raw mode
The s for sync the disk
The e for terminate all processes
The i for kill all processes
The u for remount all filesystems read only
The b for reboot the system

THIS IS THE VERY LAST SAVE YOUR BUTT PROCEDURE ! ONLY IF ALL ELSE FAILS !

Bruno

PS: If your filesystem is Ext3 or ReiserFS and on reboot it wants you to do a filesystem check, don’t touch any key when it asks you to press “Y” and let it recover the journal automatically.

NOTE: For the skinny elephants to work you need to have the sysrq-key enabled in the kernel. (CONFIG_MAGIC_SYSRQ)
You can check if it is enabled by typing “cat /proc/sys/kernel/sysrq”, if the command returns “1″ the sysrq-key is enabled.
If it returns “0″ you can enable it with “echo 1 > /proc/sys/kernel/sysrq”

Tags:

PowerPoint vs OpenOffice

Comparing PowerPoint 2007 vs OpenOffice 3.1.0 vs GoOo 3.1-10.

There is one crucial feature I use in PowerPoint that has prevented me from switching to OpenOffice: the Presenter View.

Microsoft PowerPoint

PowerPoint 2007 has further improved the presenter view from previous versions: it can now no longer hogs your primary display and can even be resized. This allows for even easier access to the main program window while a slideshow is running.

Why would you want that you may ask? Realtime edits. You can edit your slideshow while you are showing it. From adding new slides, rearranging slides, and editing slide contents – changes are updated immediately.

Editing the current live slide is also possible – with changes appearing AS YOU TYPE. It is also very easy to annotate slides, with various pen and marking tools.

OpenOffice Impress

OOo Impress does not currently include a presentation manager of any description. Well at least that’s what I can tell from the documentation and options. Worse still, this version of OOo crashes every time I attempt to run a slideshow. So at this point I gave up and decided to look at an alternative build named Go-oo.

There is a Presenter Screen plugin for OOo 3.0, but had no luck getting it to work with current builds of OOo.

Go-oo Impress

Go-oo Impress already includes the Presenter Console plugin so I was finally able to test it. Lets see how it compares to PowerPoint 2007.

PowerPoint OpenOffice
Presenter Views Single view with resizable panes: Slide scroller, Notes, and Current slide Pre-set views: Notes/Slides/Current Slide
Presenter Window Resizable Locked Fullscreen
Live Edit Yes, changes are immediate No, program interface completely locked
Go-to Slide Yes No
Annotation Yes, Pens, Hi-lighters, etc No
Blank screen Yes, Black/white screen options No

Both contain a timer and simple back/forward navigation.

This comparison reflects the features I use regularly in PowerPoint, and as you can see Impress is still rather unimpressive in this regard. I have hope that OpenOffice will continue to improve, but by the time it catches up to where PowerPoint is today the goalposts will have already moved.

Tags: , ,

Windows shutdown mindnumbingly slow

It seemed that shutdown in WindowsXP was taking excessively long, with it taking several minutes at the “Saving Your Settings” screen.

Surprisingly(?) I found a tool at Microsoft that provides a solution to get shutdown times back to only a few seconds:
User Profile Hive Cleanup Service

The User Profile Hive Cleanup service helps to ensure user sessions are completely terminated when a user logs off. System processes and applications occasionally maintain connections to registry keys in the user profile after a user logs off. In those cases the user session is prevented from completely ending. This can result in problems when using Roaming User Profiles in a server environment or when using locked profiles as implemented through the Shared Computer Toolkit for Windows XP.

Tags: ,

Firefox’s XML Slowdown

For many months a buglet had been niggling at me. Anytime I opened an XML document in Firefox the entire browser would freeze for several seconds. If I was trying to debug a RSS feed or an XML settings file this would quickly become extremely annoying.

Today I fixed it.

First I tried a few of the obvious things. I already knew that this was not a core Firefox bug because this did not happen on any other PCs – it had to be something related to my PC. I checked the default profile with all addons disabled – still froze. I tried using a profile in another user’s account – still froze.

Then I had an idea how to find the culprit: I fired up regmon. After a few tests I quickly narrowed it that the freeze was happening right after loading the key HKCR\feed\shell\open\command\(Default)

I checked the contents of that key and I saw immediately what the problem was. The key was pointing to a program on a shared folder – so every time Firefox loaded XML it would attempt to mount this shared folder and this was the cause of the freeze.

After deleting the registry key my Firefox is back to being speedier than ever!

Tags: , ,

PHP/IDE Comparison 2009

Eclipse

PHP Development Tools all-in-one edition, Version 2.0

Pros:

Show Syntax Errors/Warnings in a Tab
Show “Tasks” in a Tab (matches @TODO texts)
Subversion plugin includes repository browser

Cons:

Slow
No visual editor for HTML
Slow
No wordwrap
Slow
Cannot disable code folding
Slow
Syntax Errors/warnings cannot be customised or disabled for specific files

NetBeans

PHP Edition, Version 6.5

Pros:

Subversion support is built-in
(I love the inline Visual changes: coloured tags for add/change/delete blocks of code)
Show “Tasks” in a Tab (matches @TODO texts)

Cons:

No visual editor for HTML
No wordwrap

Notepad++

Notepad++, Version 5.1.1

Pros:

Really Fast (well this is more a text-editor than a fully featured IDE, so this is to be expected)

Cons:

Opened file tabs difficult to use (use Window Manager plugin instead)
Cannot fine-tune workspace components (eg. cannot have both Function List and Window Manager on the RHS)
Instead of “Projects” have “Sessions” and “Favourites”
Cannot disable Code Folding

Tags: , , ,