Hari's Corner

Humour, comics, tech, law, software, reviews, essays, articles and HOWTOs intermingled with random philosophy now and then

Simple technique to make your site mobile-friendly

Filed under: Tutorials and HOWTOs by Hari
Posted on Fri, Apr 13, 2012 at 16:44 IST (last updated: Sun, Apr 29, 2012 @ 07:34 IST)

If you have a complex CSS website and simply want a non-CSS version of your website to display readable text by default when you're viewing from a mobile device, or at least a device with a small screen, here's a simple, optionally two-step formula to make that site very friendly to read via a mobile browser (most likely a smartphone browser). I don't guarantee that this trick might work with older mobile browsers but it does work on Android and mobile browsers that support CSS media queries.

Here's the technique I've used to make this site mobile-friendly (by which I mean, non-CSS version): in the style sheet, simply wrap around the entire style with the following:

Read more...

Comments (0)  

The Legalease - Reloaded (new series)

Filed under: Legalease Reloaded comic by Hari
Posted on Fri, Apr 6, 2012 at 13:31 IST (last updated: Fri, Apr 6, 2012 @ 13:54 IST)

Here is my first episode of a new series, titled "The Legalease - Reloaded". It obviously won't be updated as regularly as I'd like, me being a busy lawyer, but I will try to post a few when I'm relatively free.

The Legalease Reloaded - Episode 1
Comments (0)  

The art of drafting contracts

Filed under: People and society by Hari
Posted on Thu, Apr 5, 2012 at 10:27 IST (last updated: Sun, Apr 29, 2012 @ 07:35 IST)

Contract As a lawyer, drafting contracts is one of those skills that becomes important in the context of corporate law. Not many courtroom lawyers pay much importance to drafting contracts or agreements, but undoubtedly contract drafting is a necessary skill in any lawyer's arsenal.

In my view, a good contract is not just one that establishes the duties and rights of each party, but also one that makes the business relationship absolutely clear. If a contract is incomplete in any aspect, it is a bad contract in my view. Clarity is important. Each clause of the contract should have a clear meaning, and as far as possible have only one meaning in the context. Usage of standard words is also important. Interchanging standard words and phrases with words that may mean something else in a difference context is to be avoided as much as possible. Sentences can be short and crisp, but explanations need to be given where meaning is not absolutely clear.

Read more...

Comments (4)  

Enabling Bluetooth file transfers on any Android device

Filed under: Tutorials and HOWTOs by Hari
Posted on Wed, Mar 14, 2012 at 17:15 IST (last updated: Wed, Mar 14, 2012 @ 17:16 IST)

Smart phone I have had a peculiar problem of trying to send a file to my newly acquired Android device (Sony Xperia Ray phone) from my Linux laptop. Every time the Bluetooth pairing worked perfectly fine, but the phone never responded to my attempts to connect and send a file from my Debian (KDE) desktop. I was able to get the phone to send files to my laptop but not the other way round. After hours of googling I was no closer to a working solution but I discovered this Bluetooth File transfer App in the Android market which does the job perfectly. This app will automatically enable Bluetooth on your device and also run the file receiving service so that any paired and trusted device can send files to your Android phone successfully.

Anyway, this is a just an information sharing post so that others who had the same problem as I had will find a working solution without excessive hacks or resorting to rooting the device. This is a seemingly trivial solution, but it's non-obvious to anybody who expects Bluetooth file transfers to work perfectly in Android without any user intervention.
Comments (0)  

How to get an old dot matrix printer to work on your Linux laptop

Filed under: Tutorials and HOWTOs by Hari
Posted on Thu, Mar 1, 2012 at 14:54 IST (last updated: Sat, Mar 3, 2012 @ 14:22 IST)

I recently got my hands on an old dot matrix printer, TVSE MSP 155 printer, for my office purposes. I also have a HP Officejet printer, but for large documents, I prefer a printer that doesn't waste a lot of ink. So rather than buying a laser printer, I thought I would simply use an old dot matrix printer that my uncle was kind enough to give me.

To get this printer to work on a laptop, you require a USB-to-parallel port cable. This can be obtained in any computer hardware store. Connect your printer's parallel port to your laptop's USB port using the cable. Then with the usblp kernel module loaded (modprobe usblp as root), the printer's URI will be parallel:/dev/usb/lp0. Once you add this as the device URI in CUPS, choose the Epson 9-Pin Series as the printer driver. This generic driver works with most old dot matrix printers that use the Epson chipset. Now simply print a test page and see if your printer works. It should work properly. In case it spews out junk, check if your printer model uses a different chipset or driver.

I hope this piece of information might be useful to others as well. Note that not all old dot matrix printers may work with this driver, particularly 24-pin models. There are other drivers which you can test for such models. Tip: use old, cheap or discarded single-side printed papers for testing.

Note: Do not modify the default printer settings in CUPS for the above driver. If you do, it appears that the printer does not function properly.
Comments (2)  

blogspot.com now becomes blogspot.in

Filed under: Internet and Blogging by Hari
Posted on Sun, Feb 19, 2012 at 21:40 IST (last updated: Sun, Feb 19, 2012 @ 21:44 IST)

I've noticed that recently, blogspot.com blogs automatically redirect to blogspot.in (for Indian users obviously). I have a feeling that this is partly in order to adhere to country-specific requirements for "selective content filtering to adhere to local laws" or to put it bluntly, censorship as dictated by Governments.

I've never been a big fan of those websites that redirect users to specific domains based on location, unless they offer specialized services for specific locations or otherwise are multinational company sites with country-specific information and products. I also detest websites that filter content or block me based on location or IP address-based information - either deceptively or directly.

I am glad I don't use blogspot.com at all. I request my blogging friends to at least consider alternatives. Yes, there are ways to set up a free blog without blogspot.com and stay in control of the domain as well. Owning a proper domain name costs very little (relatively speaking) and is well worth the price. Even if google don't censor as actively, you are still better off staying in full control of your precious copyrighted work.
Comments (2)