January 1st, 2009
I have a WRT54G at home but I don’t use its routing capabilities, only wireless and LAN. There are only 5 ports on the device and one is dedicated as the WAN port. I want to turn the WAN port into a LAN port so I can make use of all 5 ports. How do you do it? As long as you have shell access (obtained by telnet on custom firmwares like dd-wrt or openwrt), just type in these commands:
For WRT-54G
nvram set vlan0ports="0 1 2 3 4 5*"
nvram set vlan1ports="5"
nvram commit
For WRT-610N:
nvram set vlan1ports="0 1 2 3 4 8*"
nvram set vlan2ports="8"
nvram commit
Then reboot the router. What we’re doing is assigning the (former) WAN port (0) to the LAN vlan, instead of the WAN vlan.
Tags: wrt54g, wrt610n
Posted in Uncategorized | No Comments »
December 30th, 2008
For the Christmas holidays I’ve decided to embark on the project to build a MythTV plugin for the VideoLan client (VLC) such that you will be able to view TV recordings without the need for SMB shares or mythfrontend itself. My primary computer is Windows which can’t run mythfrontend, so to view recordings I have to resort to using samba shares and I can’t watch live TV either. With the development of MythTV Player, you could now watch recordings and even live TV. However development seemed to have stagnated. There are features like teletext that are available in VLC, but not in the MythTV Player. Wouldn’t be great if VLC could directly access MythTV, so you can watch recordings and enjoy the features like telx subtitles? That’s what I did. I made a MythTV access plugin for VLC. Currently only available for Windows:
Download it
To install it, just extract the zip and move libaccess_myth_plugin.dll to your VLC/plugins directory. This was built against VLC 0.9.8a, so you should use that. It only supports myth protocol 40 (so only works with mythTV 0.21) at the moment.
To use it, open VLC (duh), go to the menu Media > Advanced Open file. Then click the network tab and enter a myth URL ie. myth://192.168.0.10:6543/1022_20081229212500.mpg

Open MythTV URL
You can also browse recordings as well. Set up your myth backend url first by going to the preferences and selecting show settings: all. Then expand Input/Codecs > Access modules > MythTV. For the Backend Server URL option, enter something like: myth://192.168.0.10/

Set the myth backend URL
After saving the settings, click the menu Playlist > Additional Sources > Myth TV library. Then open the Playlist (Playlist > Show playlist) and you should see a MythTV option on the left. Click that and all your shows should be there.

Play List
Posted in Uncategorized | 9 Comments »
November 3rd, 2007
After hearing about the recent plans of Mozilla Co. spinning off Thunderbird into a new organisation, I can’t help but add my 2c. I see an opportunity for radical change in the direction of Thunderbird. I’ve personally used Thunderbird since the 1.0 days and it’s been an invaluable tool to manage of my email. However, there in lies the problem. With more and more people using online email these days, the role of Thunderbird is diminishing. If we step back and look at the fundamental problem which Thunderbird, which email, solves – It’s the communication between users. We now have many more forms of communication and interaction between users. More and more email is taking a backstage to more contemporary mediums such as IM and even social networking sites like MySpace and Facebook. So why are we still looking at email? There seems to be a general consensus that Thunderbird should grow into a PIM/Email client. A email/personal organiser is good, but why would you want to create something that’s already available? We shouldn’t be chasing the tail lights of Outlook and Evolution.
What I’m suggesting here I guess is to rethink Thinderbird – lose the focus on mail, in favour of more interesting communication mediums like IM, Facebook and MySpace. With the launch of OpenSocial from Google, connecting to social networks should be made much more easily. Thunderbird can utilise these APIs to bring users of social networks what it brought to email users in the past. There is a growing user base of social networks and it’s only getting larger. With many users part of several networks, managing their identities across these networks can become a painful and time-consuming. An application that manages multiple networks, a social network aggregator if you will, is something that we be desired of from these users. Thunderbird can handle multiple email accounts and it doesn’t take much to see that a natural evolution would be handling multiple social network accounts.
The new functionality, like managing social networks can’t be tacked on like an extra arm to the email functionality. There has to be a rethink from ground up. Right now the interface of Thunderbird is that of traditional email clients. You have accounts and folders and emails. This legacy model will be hard and awkward to reconcile with newer social networking models. Classification of messages/emails are no longer done with folders but with tags that allow them to he connected to multiple categories. Instead of the ‘address book’ you now have ‘friends’ and you certainly want to tag them.
Whether this new application, be it Thunderbird or a something brand new, there exists an opportunity to fill an enormous and growing void. Thunderbird is at crossroads and if there is a better time for a new direction, it would be now. In the post, I’ve mainly talked about one facet, which is social networking, but there are many other facets (IM/VoIP/Cal?) I believe should be part of the broader Thunderbird strategy. Aggregating all the different types of communication is surely a role that fits a next generation Thunderbird. This idea is not new and some members of the community share similar views.
Remember, as the /. meme goes, in Korea, only old people use email.
Posted in mozilla | No Comments »
October 23rd, 2007
Many months ago I made a PHP script that could read NTLM authentication information from your browser. What’s NTLM? Basically, if you’re using Microsoft Windows, your browser can automatically send your windows login information to a website (if you agree to it). This means that without needing to enter additional username or passwords, you can be authenticated at the website you’re visiting. This is quite convenient especially for company intranets. NTLM should work with all major browsers (Internet Explorer, Firefox and Opera).
The PHP code I wrote is simple and can be inserted into the top of any PHP script. The key output is $user $domain $workstation, which is the information advertised by the user. Be warned though, the script does NOT authenticate the user and merely assumes that the user is who they say they are. This is akin to a user entering only a username with no password required. I plan to add password/hash verification possibly in conjuction with samba in the future.
A limitation is that the PHP script relies on apache_request_headers() which is only available if you run PHP as a apache module.
You can get the source of the PHP code here.
If you try the script in Firefox (on windows), you will notice that you get prompted for a username and password when encountering an NTLM challenge. This is because sending your windows credentials to any unscrupulous website poses a real security risk. To make it automatically use your windows credentials for sites you trust, you can add the website to a whitelist.
The whitelist is located at Firefox’s about:config (type that into the address bar), which allows the editing of all of the browser’s preferences. Find the preference entry network.automatic-ntlm-auth.trusted-uris, double click on it and type the hostname of the site (ie http://www.abc.com) that you want in your whitelist. Multiple entries are seperated by commas. After doing that, Firefox should send your windows creds automatically.
Update 20/09/2009. The above script is outdated, anyone wishing to use NTLM should see the new post: Part 2 – Now with hash checking
Posted in mozilla, php | 17 Comments »
October 23rd, 2007
You would think everyday of the year has twenty-four hours right? That’s what I thought while writing a typical function to calculate the time difference between two dates. As I found out, especially in this time of year, this is a horribly flawed assumption. In a lot of timezones, one day of the year has 23 hours while another day has 25 hours. Some of you might have gathered by now that I’m talking about Daylight Saving Time. The marvellous invention, epitome of temporal manipulation that makes it so that this Sunday, there would be only be one hour between 1AM and 3AM. In summary, 3-1 = 1. Those of you on northern hemisphere will find that you will experience 2AM twice.
Once upon a time, I used to a backup cron job that runs on 2AM. 2AM seems to be a nice time as everyone is asleep so that the server could use the spare processing power for the menial task. In one day of the year it ran twice. In one day of the year it never ran. Now all my backups run at 4AM.
As a programmer, I hate DST.
Posted in Uncategorized | No Comments »
May 14th, 2007
A few weeks ago I began work on modifying the cookie system on Firefox to support multiple “containers”. Multiple Containers enables users to log in to many websites as multiple users on the same Firefox session. It is very useful for web developers who require this functionality to test their user account systems. Another use is for people who have multiple web mail accounts with the same provider that they want simultaneously logged on to. This is an oft-requested feature that Internet Explorer partially supports. (See bug #117222)
I’m happy to say that this is now ready for testing. Below is a working build for Windows. It is based on the latest Trunk plus the cookie patch and extension. Unfortunately for Mac and Linux users that wish to try the patch, they will have to manually compile Firefox with the patch below.
Read the rest of this entry »
Posted in mozilla | 5 Comments »