Archive for category Internet

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: ,

A Quick Look at Firefox3

I’ve been testing Firefox3 for a few days now and it has been a great improvement over previous versions.

The new Location bar – really is the Awesome bar! I’m already getting used to the new look of the suggestions, and sourcing from bookmarks as well as history is a great improvement.

Firefox is finally using sqlite for bookmarks and history. This makes a noticable difference in speed and also allows for some more advanced features in the bookmarks system.

The unobtrusive Password Manager drop-down is another great improvement. It waits until after you submit the form before asking, and it no longer blocks the interface so the user can easily ignore it.

Addons

As for Addons, these have already been updated to support Firefox3:

Adblock Plus
Add Bookmark Here2
ColorfulTabs
Greasemonkey
Locationbar2
Menu Editor
NoScript
QuickProxy
Web Developer

Addons still waiting for updates:

AutoCopy and Copy Plain Text (inter-related)
No-Referer
Organize Status Bar
Paste and Go 2
Permit Cookies

Preferences

I found that a few preference changes are required to optimise the performance and experience:

browser.tabs.tabMinWidth;60
browser.tabs.closeButtons;0 // only 1 close button, on current window browser.tabs.loadDivertedInBackground;true // load tabs in background
browser.fixup.alternate.enabled;false // disable automatically adding of www. and .com to urls

Tags:

Bittorrent can’t load fastresume data

Testing the Bittorrent CLI client I noticed an error “can’t load fastresume data”. This was forcing it to rescan the entire data before resuming the torrent – even if nothing had changed since the previous run.

A bit of searching found this solution:

change file /usr/lib/python2.5/site-packages/BitTorrent/Storage.py
modify line 216

str(os.path.getmtime(filename)) + '\n')

to

str(int(os.path.getmtime(filename))) + '\n')

remove the binaries

rm /usr/lib/python2.5/site-packages/BitTorrent/Storage.pyo
rm /usr/lib/python2.5/site-packages/BitTorrent/Storage.pyc

Tags: , , ,

Firefox save-as for unknown mime-type

If Firefox 2.0 does not recognise a mime-type it forces you to jump through hoops every time you wish to save a file of that type – never giving you the option to make a default action (eg. save-as) for the type.

Getting tired of this I eventually did some research to find a solution, case in point is the RAR file type (application/x-rar; application/x-rar-compressed).

Option 1: An Addon

Add the Mime-Edit extension that allows you edit any mime-type’s properties and actions, even those not recognised by Firefox.

Option 2: Hack

If you are confident in XML manually edit mimeTypes.rdf in your profile folder:

<RDF:Description RDF:about="urn:mimetype:application/x-rar-compressed"
NC:fileExtensions="rar"
NC:description=""
NC:value="application/x-rar-compressed"
NC:editable="true">
<NC:handlerProp RDF:resource="urn:mimetype:handler:application/x-rar-compressed"/>
</RDF:Description>

<RDF:Description RDF:about="urn:mimetype:handler:application/x-rar-compressed"
NC:alwaysAsk="false"
NC:useSystemDefault="false"
NC:saveToDisk="true">
<NC:externalApplication RDF:resource="urn:mimetype:externalApplication:application/x-rar-compressed"/>
</RDF:Description>

And in the section <RDF:Seq RDF:about=”urn:mimetypes:root”> add in this new row:

<RDF:li RDF:resource="urn:mimetype:application/x-rar-compressed"/>

Tags: , ,

Firefox addons of awesome

Addons I have used or tried in Firefox 2.0

Addons kept

AdBlock Plus: wildcards work great for blocking troublesome adsites and iframes.

Permit Cookies: block 3rd Party cookies and/or block all untrusted sites.

Add Bookmark Here 2: an easier way to add a bookmark deep in your hierarchy of bookmarks.

Auto Copy: text selected with mouse is automatically copied (works with Copy Plain Text).

Copy Plain Text: copies selected content as plain-text instead of html.

Colorful Tabs: generate tab colors by domain name.

Paste and Go 2: mapped to a mouse-button this can open a link from your clipboard in a new tab with a single click.

Stop-or-Reload Button: save precious toolbar space by merging the stop & reload buttons.

QuickProxy: turn browser proxy on/off with a single click.

Web Developer: world’s most important Firefox addon.

No-referrer: block the referrer string from being sent to 3rd Party sites.

Bookmark Duplicate Detector: detects and cleans duplicate bookmarks. Also makes backups for bookmarks file.

Kelvin’s Australian English Dictionary: Australian dictionary without all the US-American misspellings.

Greasemonkey: used with Youtube video downloader and Niconico video downloader.

Locationbar2: highlight domain or subdomain, and make sections of the URL clickable.

Menu Editor: edit the context menus, promote Save Image, hide send-to and set-wallpaper.

Configuration Mania: disable SmartBrowsing, Tab button on active tab only, Disable link prefetching.

Extended Statusbar: add some simple page stats to the statusbar.

NoScript: blocks 3rd Party Javascript and Flash.

Addons removed

ErrorZilla Mod: never used the buttons it provided.

Linky: make all urls clickable. (I found Paste&Go worked better for me)

MR Tech Local Install: was useful to install addons from local files, but gained too much uneccessary clutter with recent updates.

Searchbar Autosizer: I eventually removed the searchbar completely, rendering this addon meaningless.

Tab To Window: browser would often crash if I tried to use this.

Restart Firefox: expected to save session and restart browser, but does not restore ALL windows >_<.

Tags: ,