<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Janeks random writings</title>
	<atom:link href="http://www.hellqvist.com/janek/weblog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hellqvist.com/janek/weblog</link>
	<description>No, it's not another diary.</description>
	<pubDate>Fri, 29 Aug 2008 08:35:22 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>How to connect to a Samba share using multiple usernames and passwords</title>
		<link>http://www.hellqvist.com/janek/weblog/2008/08/29/how-to-connect-to-a-samba-share-using-multiple-usernames-and-passwords/</link>
		<comments>http://www.hellqvist.com/janek/weblog/2008/08/29/how-to-connect-to-a-samba-share-using-multiple-usernames-and-passwords/#comments</comments>
		<pubDate>Fri, 29 Aug 2008 08:35:22 +0000</pubDate>
		<dc:creator>Janek</dc:creator>
		
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.hellqvist.com/janek/weblog/?p=35</guid>
		<description><![CDATA[Windows XP might be fully cooperative if you want to connect to two different Samba shares on the same machine, using different user names. Here&#8217;s how to solve it.

Open up your &#8220;hosts&#8221; file in a text editor. This is the location on Windows XP:
C:\WINDOWS\system32\drivers\etc\hosts


Add two different hostnames with the same IP address.
Enter control panel -&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>Windows XP might be fully cooperative if you want to connect to two different Samba shares on the same machine, using different user names. Here&#8217;s how to solve it.</p>
<ul>
<li>Open up your &#8220;hosts&#8221; file in a text editor. This is the location on Windows XP:
<pre>C:\WINDOWS\system32\drivers\etc\hosts
</pre>
</li>
<li>Add two different hostnames with the same IP address.</li>
<li>Enter control panel -&gt; User accounts and select your user. Then click &#8220;Manage your network passwords&#8221; (in the upper left corner, assuming you haven&#8217;t selected &#8220;classic mode&#8221;).</li>
<li>Add the different host names and the corresponding user names and passwords you want to use. You might need to add &#8220;MACHINENAME\&#8221; before the user name. The MACHINENAME is the network name of your Windows machine.</li>
<li>Optionally, map the shares as network drives.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.hellqvist.com/janek/weblog/2008/08/29/how-to-connect-to-a-samba-share-using-multiple-usernames-and-passwords/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to add direct Wikipedia/Last.fm/etc search to the Firefox search bar</title>
		<link>http://www.hellqvist.com/janek/weblog/2008/06/20/how-to-add-direct-wikipedialastfmetc-search-to-the-firefox-search-bar/</link>
		<comments>http://www.hellqvist.com/janek/weblog/2008/06/20/how-to-add-direct-wikipedialastfmetc-search-to-the-firefox-search-bar/#comments</comments>
		<pubDate>Fri, 20 Jun 2008 21:46:25 +0000</pubDate>
		<dc:creator>Janek</dc:creator>
		
		<category><![CDATA[Computer related bits &#038; pieces]]></category>

		<category><![CDATA[firefox]]></category>

		<category><![CDATA[wikipedia]]></category>

		<guid isPermaLink="false">http://www.hellqvist.com/janek/weblog/?p=34</guid>
		<description><![CDATA[I visit Wikipedia and Last.fm several times daily, but recently grew tired of doing manual searches by editing the URL:s in my browser history. Adding the sites to the Firefox search bar was easy (especially with the great Mycroft service), but the downside was the extra step added by the search result page.
Since I usually [...]]]></description>
			<content:encoded><![CDATA[<p>I visit Wikipedia and Last.fm several times daily, but recently grew tired of doing manual searches by editing the URL:s in my browser history. Adding the sites to the Firefox search bar was easy (especially with the great <a href="http://mycroft.mozdev.org/">Mycroft service</a>), but the downside was the extra step added by the search result page.</p>
<p>Since I usually know exactly what I&#8217;m looking for, I wanted to be able to go directly to a certain page when entering a search term, instead of searching for the term.</p>
<p>This is how you modify Firefox to behave that way:</p>
<ul>
<li>Add the search engines to Firefox through <a href="http://mycroft.mozdev.org/">Mycroft</a> or the official <a href="https://addons.mozilla.org/en-US/firefox/browse/type:4/cat:all?sort=name">Add-on repository</a>.</li>
<li>Close Firefox.</li>
<li>On XP, enter the directory
<pre>C:\Documents and Settings\<strong>YOURUSERNAME</strong>\Application Data\Mozilla\Firefox\Profiles\<strong>YOURPROFILE</strong>\searchplugins</pre>
</li>
<li>Open the xml files in a text editor.</li>
<li>For Wikipedia, you need to change the following line
<pre>&lt;os:Url type="text/html" method="GET" template="http://en.wikipedia.org/wiki/{searchTerms}&amp;sourceid=mozilla-search"&gt;</pre>
<p>into this:</p>
<pre>&lt;os:Url type="text/html" method="GET" template="http://en.wikipedia.org/wiki/{searchTerms}"&gt;</pre>
</li>
<li>I.e., change the URL so that it points straight at the article instead of the search function.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.hellqvist.com/janek/weblog/2008/06/20/how-to-add-direct-wikipedialastfmetc-search-to-the-firefox-search-bar/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to remove the Google logo from the Picasa screen saver</title>
		<link>http://www.hellqvist.com/janek/weblog/2007/12/13/how-to-remove-the-google-logo-from-the-picasa-screen-saver/</link>
		<comments>http://www.hellqvist.com/janek/weblog/2007/12/13/how-to-remove-the-google-logo-from-the-picasa-screen-saver/#comments</comments>
		<pubDate>Wed, 12 Dec 2007 22:06:04 +0000</pubDate>
		<dc:creator>Janek</dc:creator>
		
		<category><![CDATA[Windows]]></category>

		<category><![CDATA[google]]></category>

		<category><![CDATA[picasa]]></category>

		<guid isPermaLink="false">http://www.hellqvist.com/janek/weblog/2007/12/13/how-to-remove-the-google-logo-from-the-picasa-screen-saver/</guid>
		<description><![CDATA[I recently installed Google&#8217;s Picasa, and even though I ultimately decided to use Photoshop Elements, I really liked the Picasa screen saver. It lets you display random images from multiple folders, and has some pretty nifty transition effects. Much better than the XP &#8220;My pictures&#8221; screen saver.
I was quite annoyed but the Google logos displayed [...]]]></description>
			<content:encoded><![CDATA[<p>I recently installed Google&#8217;s <a href="http://picasa.google.com/" target="_blank">Picasa</a>, and even though I ultimately decided to use Photoshop Elements, I really liked the Picasa screen saver. It lets you display random images from multiple folders, and has some pretty nifty transition effects. Much better than the XP &#8220;My pictures&#8221; screen saver.</p>
<p>I was quite annoyed but the Google logos displayed every now and then on top of my pictures, and decided to try to remove them. It wasn&#8217;t hard, here&#8217;s how I did it.</p>
<ul>
<li>Install a resource editing program, such as the <a href="http://www.wilsonc.demon.co.uk/d10resourceeditor.htm" target="_blank">XN Resource Editor</a>.</li>
<li>Open up the Picasa installation folder and make a backup of the file Picasa2.scr, just in case you want to switch back to the branded screen saver again.</li>
<li>Start the XN Resource Editor and open the file Picasa2.scr.</li>
<li>Locate the two JPEG resources in the resource tree, in my case it was 111 and 114 (this might differ between different versions of the screen saver).</li>
<li>Right-click on the resources and choose &#8220;Delete Resource&#8221;.</li>
<li>Save the file.</li>
<li>Done! The Google logos have now been removed from the screen saver!</li>
</ul>
<p>A little tip: The same screen saver (atleast AFAIK) is available in the <a href="http://pack.google.com/" target="_blank">Google Pack</a>, in case you don&#8217;t want to install the full Picasa suite. It&#8217;s called &#8220;Google Photos Screensaver&#8221;, but seems to be the same program that they bundle with Picasa.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hellqvist.com/janek/weblog/2007/12/13/how-to-remove-the-google-logo-from-the-picasa-screen-saver/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to sync a Sony Ericsson phone with the Thunderbird/Lightning calendar</title>
		<link>http://www.hellqvist.com/janek/weblog/2007/12/12/how-to-sync-a-sony-ericsson-phone-with-the-thunderbirdlightning-calendar/</link>
		<comments>http://www.hellqvist.com/janek/weblog/2007/12/12/how-to-sync-a-sony-ericsson-phone-with-the-thunderbirdlightning-calendar/#comments</comments>
		<pubDate>Wed, 12 Dec 2007 21:39:41 +0000</pubDate>
		<dc:creator>Janek</dc:creator>
		
		<category><![CDATA[Windows]]></category>

		<category><![CDATA[lightning]]></category>

		<category><![CDATA[sony ericsson]]></category>

		<category><![CDATA[thunderbird]]></category>

		<guid isPermaLink="false">http://www.hellqvist.com/janek/weblog/2007/12/12/how-to-sync-a-sony-ericsson-phone-with-the-thunderbirdlightning-calendar/</guid>
		<description><![CDATA[If you&#8217;re using the Mozilla Thunderbird extension Lightning for your calendar, here&#8217;s a quick howto on making it synchronize with your Sony Ericsson phone. It worked great on my W910!

Install the excellent freeware program MyPhoneExplorer.
Enter the Options (F2), choose Sync and then choose Thunderbird Lightning in the &#8220;Calendar&#8221; field.
MyPhoneExplorer will automatically install the required Thunderbird [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re using the <a href="http://www.mozilla.com/thunderbird/" target="_blank">Mozilla Thunderbird</a> extension <a href="https://addons.mozilla.org/en-US/thunderbird/addon/2313" target="_blank">Lightning</a> for your calendar, here&#8217;s a quick howto on making it synchronize with your Sony Ericsson phone. It worked great on my W910!</p>
<ul>
<li>Install the excellent freeware program <a href="http://www.fjsoft.at/en/" target="_blank">MyPhoneExplorer</a>.</li>
<li>Enter the Options (F2), choose Sync and then choose Thunderbird Lightning in the &#8220;Calendar&#8221; field.</li>
<li>MyPhoneExplorer will automatically install the required Thunderbird plugin.</li>
<li>Click on &#8220;Advanced&#8221; to choose which calendar to sync and what mode (merge calendars or let phone override Lightning or vice versa)</li>
<li>Hit Ok, enter the Calendar and hit sync - done!</li>
</ul>
<p>If you want to create a desktop shortcut to automatically start the sync - duplicate the shortcut to MyPhoneExplorer, enter the icon properties and add &#8220;action=sync syncitem=organizer&#8221; to the destination (after myphoneexplorer.exe). There are more command line options available in the <a href="http://www.fjsoft.at/forum/viewtopic.php?t=42" target="_blank">English FAQ</a>.</p>
<p>Hope this howto helps someone, it sure made my life a lot easier! Before I discovered this method, I was auto-exporting the calendar as an ICS file (through a <a href="http://www.sunbird-kalender.de/index.php" target="_blank">dedicated Thunderbird extension</a>) and then importing in manually into MyPhoneExplorer on a regular basis. Now I only need to connect the USB cable and click the dedicated shortcut - quite an improvement!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hellqvist.com/janek/weblog/2007/12/12/how-to-sync-a-sony-ericsson-phone-with-the-thunderbirdlightning-calendar/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Auto-mounting Samba shares on Windows XP</title>
		<link>http://www.hellqvist.com/janek/weblog/2007/10/09/auto-mounting-samba-shares-on-windows-xp/</link>
		<comments>http://www.hellqvist.com/janek/weblog/2007/10/09/auto-mounting-samba-shares-on-windows-xp/#comments</comments>
		<pubDate>Tue, 09 Oct 2007 18:04:24 +0000</pubDate>
		<dc:creator>Janek</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Windows]]></category>

		<category><![CDATA[samba]]></category>

		<guid isPermaLink="false">http://www.hellqvist.com/janek/weblog/2007/10/09/auto-mounting-samba-shares-on-windows-xp/</guid>
		<description><![CDATA[Getting Windows XP to remember the password for mounted network folders can be a real hassle, but here&#8217;s some help. I&#8217;m not sure if this is a Samba-specific problem or not, but it has happened to me several times now on both Windows 2000 and XP machines.

Try using the &#8220;Manage my network passwords&#8221; window (accessed [...]]]></description>
			<content:encoded><![CDATA[<p>Getting Windows XP to remember the password for mounted network folders can be a real hassle, but here&#8217;s some help. I&#8217;m not sure if this is a Samba-specific problem or not, but it has happened to me several times now on both Windows 2000 and XP machines.</p>
<ul>
<li>Try using the &#8220;<a href="http://support.microsoft.com/kb/306541">Manage my network passwords</a>&#8221; window (accessed through the &#8220;User accounts&#8221; applet in the control panel)</li>
<li>If that didn&#8217;t help:</li>
</ul>
<ul>
<li>Make sure to enter the server name in the username box, example: MACHINE\username</li>
<li>Try entering the IP address of the server instead of the host name (worked for me when everything else failed).</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.hellqvist.com/janek/weblog/2007/10/09/auto-mounting-samba-shares-on-windows-xp/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Filtering guestbook spam</title>
		<link>http://www.hellqvist.com/janek/weblog/2006/12/16/filtering-guestbook-spam/</link>
		<comments>http://www.hellqvist.com/janek/weblog/2006/12/16/filtering-guestbook-spam/#comments</comments>
		<pubDate>Sat, 16 Dec 2006 11:02:48 +0000</pubDate>
		<dc:creator>Janek</dc:creator>
		
		<category><![CDATA[Web development]]></category>

		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://www.hellqvist.com/janek/weblog/2006/12/16/filtering-guestbook-spam/</guid>
		<description><![CDATA[Guestbooks, as well as all public forms on the WWW, are constantly abused nowadays by spam bots trying to fill them with spam links. In the guestbook for my band, I had a ratio of 1/10 - about 9 spams for every valid post. Here are the spam filtering techniques I implemented that worked for [...]]]></description>
			<content:encoded><![CDATA[<p>Guestbooks, as well as all public forms on the WWW, are constantly abused nowadays by spam bots trying to fill them with spam links. In the <a href="http://www.mindslip.net/interact.php">guestbook</a> for my <a href="http://www.mindslip.net/">band</a>, I had a ratio of 1/10 - about 9 spams for every valid post. Here are the spam filtering techniques I implemented that worked for me:</p>
<ul>
<li>First, a <strong>black list</strong>. I have an array with bad words (viagria, cialis, roulette, casino) which are common in spam posts and quite uncommon in valid guestbook entries. Every post is checked against the black list. The black list also contains a few URL:s that are often used by spammers (blogspot.com and hometown.aol.com) as well as the tag [url= which is probably BBcode.</li>
</ul>
<ul>
<li><strong>Link spamming</strong>. A quick check is made on the number of http:// links, if it’s above 5 - well, it’s most probably a spam!</li>
</ul>
<ul>
<li><strong>Cookie test</strong>. This is something I picked up on a mailing list a few weeks ago, and it works brilliantly. The idea is that spam bots aren’t valid browsers, they just look for forms and submit them. The trick is to set a cookie when the form is displayed, and then check for the existance of that cookie when the form is received, before it’s saved. If there’s no cookie - the post isn’t saved! This stops people with cookies disabled from entering posts, but it stops a LOT of spam.</li>
</ul>
<p>BTW, here&#8217;s my entire black list as of today:<br />
<em>levitra,viagra,cialis,porn,roulette,casino,hometown.aol.com,blogspot.com,[url= </em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hellqvist.com/janek/weblog/2006/12/16/filtering-guestbook-spam/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Maximum image size in WordPress 2</title>
		<link>http://www.hellqvist.com/janek/weblog/2006/12/08/maximum-image-size-in-wordpress-2/</link>
		<comments>http://www.hellqvist.com/janek/weblog/2006/12/08/maximum-image-size-in-wordpress-2/#comments</comments>
		<pubDate>Fri, 08 Dec 2006 21:34:48 +0000</pubDate>
		<dc:creator>Janek</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.hellqvist.com/janek/weblog/2006/12/08/maximum-image-size-in-wordpress-2/</guid>
		<description><![CDATA[There seems to be a hard-coded maximum size for images uploaded in WordPress 2.0 - images larger than 3 Mpixels aren&#8217;t resized into thumbnails for some odd reason (maybe not to stress the web server?).
If you think your web host has enough horse power to resize large images, go ahead and modify line 89 in [...]]]></description>
			<content:encoded><![CDATA[<p>There seems to be a hard-coded maximum size for images uploaded in WordPress 2.0 - images larger than 3 Mpixels aren&#8217;t resized into thumbnails for some odd reason (maybe not to stress the web server?).</p>
<p>If you think your web host has enough horse power to resize large images, go ahead and modify line 89 in <em>wp-admin/inline-uploading.php</em> and change the number three to something higher:</p>
<p><code>if ( $imagedata['width'] * $imagedata['height'] &lt; 3 * 1024 * 1024 ) {</code></p>
<p>This should be added to the <a href="http://codex.wordpress.org/Using_Image_and_File_Attachments">WordPress Codex</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hellqvist.com/janek/weblog/2006/12/08/maximum-image-size-in-wordpress-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SquirrelMail 1.4.0 and &#8220;unknown response from server&#8221;</title>
		<link>http://www.hellqvist.com/janek/weblog/2006/10/04/squirrelmail-140-and-unknown-response-from-server/</link>
		<comments>http://www.hellqvist.com/janek/weblog/2006/10/04/squirrelmail-140-and-unknown-response-from-server/#comments</comments>
		<pubDate>Wed, 04 Oct 2006 09:28:36 +0000</pubDate>
		<dc:creator>Janek</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.hellqvist.com/janek/weblog/2006/10/04/squirrelmail-140-and-unknown-response-from-server/</guid>
		<description><![CDATA[After restoring a maildir based mailbox from a backup, the user in question experienced some odd errors from SquirrelMail. When opening the inbox, the error &#8220;unknown response from server&#8221; was displayed by SquirrelMail.
I moved all files from the inbox to a temporary directory and started moving the back a few at a time, to isolate [...]]]></description>
			<content:encoded><![CDATA[<p>After restoring a maildir based mailbox from a backup, the user in question experienced some odd errors from SquirrelMail. When opening the inbox, the error &#8220;unknown response from server&#8221; was displayed by SquirrelMail.</p>
<p>I moved all files from the inbox to a temporary directory and started moving the back a few at a time, to isolate which emails that caused the problem. After about an hour of investigation, I noticed that there were a few duplicates with the same size and almost the same name. The only thing that differed was the <a href="http://cr.yp.to/proto/maildir.html">Maildir &#8220;flags&#8221;</a> after the comma.</p>
<p>The reason was probably that the user was viewing his mailbox <em>while the backup was being restored</em>, causing some files to be renamed and thus creating duplicates. The IMAP server (Courier in this case) was apparently confused by multiple files with the same timestamp but with different flags, and dropped the connection to SquirrelMail.</p>
<p>To isolate the duplicates, I used ls -1 and cut:<br />
<code>/bin/ls -1|cut -d "," -f 1|uniq -c|sort -n</code></p>
<p>Then I removed the duplicates, which were the files with file count > 2 in the list produced by ls.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hellqvist.com/janek/weblog/2006/10/04/squirrelmail-140-and-unknown-response-from-server/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Blocking comment spam with Apache and htaccess</title>
		<link>http://www.hellqvist.com/janek/weblog/2006/05/18/blocking-comment-spam-with-apache-and-htaccess/</link>
		<comments>http://www.hellqvist.com/janek/weblog/2006/05/18/blocking-comment-spam-with-apache-and-htaccess/#comments</comments>
		<pubDate>Wed, 17 May 2006 22:12:17 +0000</pubDate>
		<dc:creator>Janek</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.hellqvist.com/janek/weblog/2006/05/18/blocking-comment-spam-with-apache-and-htaccess/</guid>
		<description><![CDATA[I&#8217;ve been plagued by comment spam in this weblog for a month or two now, and today I got really tired of deleting 3-4 spam comments every day.
When I investigated the originating IP:s, I noticed that all spam except ONE came from one of four C-nets. I quickly decided to block in the .htaccess file [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been plagued by comment spam in this weblog for a month or two now, and today I got really tired of deleting 3-4 spam comments every day.</p>
<p>When I investigated the originating IP:s, I noticed that all spam except ONE came from one of four C-nets. I quickly decided to block in the .htaccess file in the weblog directory.</p>
<p>Here&#8217;s what I added.<br />
<code><br />
# DIE, SPAMBOTS, DIE!</p>
<limit GET HEAD POST>
order allow,deny<br />
deny from 208.66.193<br />
deny from 64.62.22<br />
deny from 81.177.14<br />
deny from 81.177.15<br />
allow from all
</limit>
</code></p>
<p>I&#8217;m willing to take the very small risk that a valid user from one of these IP:s won&#8217;t be allowed to enter my weblog.</p>
<p>(Yes, I know that I could install a WordPress plugin, but this was quicker and less cumbersome. )</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hellqvist.com/janek/weblog/2006/05/18/blocking-comment-spam-with-apache-and-htaccess/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A javascript bookmarklet for converting timestamps</title>
		<link>http://www.hellqvist.com/janek/weblog/2005/11/28/a-javascript-bookmarklet-for-converting-timestamps/</link>
		<comments>http://www.hellqvist.com/janek/weblog/2005/11/28/a-javascript-bookmarklet-for-converting-timestamps/#comments</comments>
		<pubDate>Mon, 28 Nov 2005 14:00:56 +0000</pubDate>
		<dc:creator>Janek</dc:creator>
		
		<category><![CDATA[Web development]]></category>

		<guid isPermaLink="false">http://www.hellqvist.com/janek/weblog/2005/11/28/a-javascript-bookmarklet-for-converting-timestamps/</guid>
		<description><![CDATA[I spend a lot of time working with timestamps (unixtime aka epoch) in phpMyAdmin, and got really tired of either cut-and-paste:ing the timestamps to my home-made timestamp converter or adding &#8220;FROM_UNIXTIME(created)&#8221; to the SQL queries to get the timestamps in a readable format&#8230;
The other day I got the idea to make a bookmarklet that does [...]]]></description>
			<content:encoded><![CDATA[<p>I spend a lot of time working with <a href="http://en.wikipedia.org/wiki/Unix_epoch">timestamps</a> (unixtime aka epoch) in <a href="http://www.phpmyadmin.net/">phpMyAdmin</a>, and got really tired of either cut-and-paste:ing the timestamps to my home-made timestamp converter or adding &#8220;FROM_UNIXTIME(created)&#8221; to the SQL queries to get the timestamps in a readable format&#8230;</p>
<p>The other day I got the idea to make a <a href="http://en.wikipedia.org/wiki/Bookmarklet">bookmarklet</a> that does the conversion for me, and voilá! All you have to do is mark the timestamp and click the &#8220;Convert&#8221; bookmarklet. You&#8217;ll get an input field if you don&#8217;t mark anything.</p>
<p>Here&#8217;s the bookmarklet:<br />
<a href="javascript:q=document.getSelection();for(i=0;i<frames.length;i++){q=frames[i].document.getSelection();if(q)break;}if(!q)void(q=prompt('Enter timestamp:',''));if(q){d=new Date;d.setTime(q*1000);alert(d.toLocaleString())};">Convert timestamp</a> (Bookmark the link, don&#8217;t click it!)</p>
<p>Please let me know if you find it useful or think of a way to improve it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hellqvist.com/janek/weblog/2005/11/28/a-javascript-bookmarklet-for-converting-timestamps/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
