Thursday, March 14, 2013

Measure USB card speed

It is sometimes necessary to confirm the read and write speed of an USB card. h2testw is such an utility. The author's page is written in German, but you can also read about the tool in English.

Author's page in Germam (website)
English page (download)

Tuesday, February 12, 2013

Nonintrusive and customizable screen capture tool

Greenshot is an opensource screen capture tool for Windows. It is very customizable and can be configured to generate captures without any notifications.

Greenshot (website)

Saturday, February 02, 2013

Take ownership of files/folders after reinstalling Windows

If you use the NTFS filesystem, you may notice that you may not be able to access certain files or folders after you have reinstalled Windows. This is due to a change in ownership of the files or folders. To gain access again, open the command line with administrator permissions and run the following commands. Note, the takeown command with the /r flag will recursively reassign ownership of all files/folders under the current folder to the current owner.

cd <parent folder>
takeown /r /f .

Sunday, November 25, 2012

DD-WRT wireless bridging modes

DD-WRT supports various wireless bridging modes.
  • Client
  • Client Bridge
  • Repeater
  • Repeater Bridge
The following page from the DD-WRT wiki explains the differences.

Saturday, November 10, 2012

Slow scrolling speed in Emacs

When a large buffer is open which requires fontification, you may notice that continuous scrolling becomes choppy. Fontification by default is not deferred and takes place immediately. This causes the fontification of large buffers to slow down the act of scrolling. The effect is magnified when the size of the Emacs window is increased. To address this problem, defer fontification by setting an idle time after which deferred fontification should take place. Add the following code to your .emacs file. You can tweak the value to suit your system requirements.

(setq jit-lock-defer-time 0.05)

DD-WRT client bridge mode

DD-WRT supports client bridge mode. This mode allows you to extend your network via a wireless router. Note, this does not extend the wireless coverage of the master router. The additional wireless router uses the same subset as the master router. Since the same subset is used for both routers, devices connected to one router can talk directly to devices on the other router. There are many guides online. Some of them do not explain caveats and some lists unnecessary steps. Here is my experience with configuring DD-WRT for client bridge mode.

This guide assumes that you already have a router running DD-WRT with wireless support enabled. We will call this the master router. We will configure an additional router also running DD-WRT for client bridge mode. We will call this the client router.

The master router

In the remaining steps, we will assume your master router has the Local IP address 192.168.1.1 and wireless is enabled. No additional changes need to be performed on the master router to support client bridge mode.

The client router
  • Access the network settings of your computer and give your computer the static IP 192.168.1.8 and connect your computer to the client router.
  • Administration->Factory Defaults->Reset router settings
    • Reset Factory Defaults
      • Let's reset the router to the default settings
  • Setup->Basic Setup
    • Router Name
      • Specify a different name from the master router.
    • Local IP Address
      • Specify a different Local IP Address from the master router. 192.168.1.2 is sufficient.
    • Subnet Mask
      • Specify 255.255.255.0
    • Gateway
      • Specify 192.168.1.1. Note, this is the IP of the master router.
    • Local DNS
      • Specify the same value as the Gateway: 192.168.1.1.
  • Wireless->Basic Settings
    • Wireless Mode
      • Select Client Bridge
    • Wireless Network Mode
      • Select the same setting as your master router
    • Wireless Network Name (SSID)
      • Specify the same name as your master router
  • Wireless->Wireless Security
    • Security Mode
      • Select the same setting as your master router
    • WPA Algorithms
      • Select the same setting as your master router
    • WPA Shared Key
      • Specify the same key as your master router
  • Access the network settings of your computer and set your network preferences to receive an IP from DHCP.
For me, the above steps were sufficient to have the client router functioning in client bridge mode.

Checking if the client has established a connection

To check if you the client router has connected to the main router, on the client router, go to Status->Wireless. Under Wireless Nodes->Access Point, you should see an entry with a MAC address. If not, the connection has not been established, and you will need to troubleshoot why the connection has not been made. See below.

Troubleshooting
  • Not all Wireless Network Modes work under client bridge mode. I was not successful at using BG-Mixed, for example. Try selecting other Wireless Network Modes.
  • Not all Security Modes work under client bridge mode. Try selecting other Security Modes.
  • If you are still having connection issues, try to test the connection by disabling both Wireless Network Mode and the Security Mode. This disables wireless security but this will confirm whether the problem is caused by the wireless security settings.
Additional Steps

It is not clear if these steps are necessary. I did not need to change them to have the client router function in client bridge mode.
  • Since NAT is handled only by the master router, the client should not need this support
    • Setup->Advanced Routing->Operating Mode->Operating Mode
      • Select Router
  • Since the Firewall is handled by the master router, the client should not need this support.
    • Security->Firewall->Firewall Protection->SPI Firewall
      • Select Disable
Optional Steps
  • Since the WAN port is no longer necessary, you can assign it to be a LAN port.
    • Setup->Basic Setup->Assign WAN Port to Switch
      • Select the checkbox.

Tuesday, October 23, 2012

Remap Caps Lock key in Windows

It may be sometimes useful to remap certain keys on your keyboard. The Caps Lock key on the keyboard is not useful to me, and I prefer to remap it as a Ctrl key. This makes Emacs a little easier to use on standard keyboards. It is certain possible to do this in Windows using a free tool from Microsoft. You can find it below.

Windows Server 2003 Resource Kit Tools, requires installation (website)
Windows 2000 Resource Kit Tools, unpacked for standalone download (website)

Monday, August 20, 2012

Delete a file whose name begins with a dash

Sometimes, you may find a file whose name begins with a dash. If you need to operate on the file, you may find that the filename may be interpreted as an argument to the command rather than the filename itself. This is problematic. To get around this problem, specify the path to the file. Use the following command to remove the file called -tmp.txt.

rm ./-tmp.txt