// archives

Tips N Tricks

This category contains 22 posts

DD-WRT: Share Hotel’s limited WiFi with unlimited devices

While we hear about free WiFi for public, roaming on the road and window shopping in malls, hotels still charge for WiFi. What’s more they charge per device! To my surprise, 3 star hotels give free WiFi (speed is debatable ;-)) but 5+ star hotels charge for it or restrict it to a one or couple of devices.

At such a hotel, you will be typically given the SSID of the WiFi, a login (usually the room number) and a password. The WiFi will not be password protected (aka open). But once you connect to the WiFi, you will be taken to a login page. Without filling a username and password (given by the hotel) at this login page, you will not be able to browse the web or download your emails. With the per device restriction, you will be able to connect to the Internet only from the device from which you log in on the login page. So as long as the hotel system sees one or the permissible no. of devices connected, you are good to go. So how to get around this?

Earlier during one of vacations I was caught unaware by the per device charges. So I ended up doing something complicated as follows:

Read the rest of this entry »

GD Star Rating
loading...
GD Star Rating
loading...
Share

Wish your partner a happy Valentine’s Day with Android Device Manager

Security is a serious affair, and so is love 😉 So I thought about using one of the security features on Android to surprise my wife on this Valentine’s day.

Wish Happy Valentine's Day with Android Lock Screen

Wish Happy Valentine’s Day with Android Lock Screen

Do not read any further if you don’t know your partner’s passwords. And the best way to get your partner’s password is to share your passwords with him/her.

Fortunately I know the passwords that my wife uses (thanks to the tip mentioned above).

Next, all the phones/tablets (Android, Windows Phone, iPad, Blackberry) can be setup for remote locate, lock and wipe. That’s one of the first few things that I setup on my devices. So the remote security (Android Device Manager) was setup on my wife’s phone (OnePlus One). The stage was all set for the fun. Read the rest of this entry »

GD Star Rating
loading...
GD Star Rating
loading...
Share

Drupal: Redirect to node when View returns only one row

Ever since I started working on my Wildlife photo gallery in Drupal, I have been discovering the power of Views, which I seldom tap in time-bound projects. Here is an interesting trick that I would like to share.

The case is as follows. I have set up a Page using Views that displays photos based on criteria like species, location and type. The Views Page displays the thumbnails of the photos. Each thumbnail is linked to the Node page, which displays a larger photo and its details.

The page looks good and populated when I have lots of photos for each criteria. Unfortunately, in certain cases I do not have more than one photo displayed on the Views page. For example, I have only one photo of most species – since I started Wildlife photography just this year. As a result, the Views Page shows the thumbnail photo of just one species. This requires an extra, unnecessary click for the visitor to go to the Node page to see the larger photo and its details. Read the rest of this entry »

GD Star Rating
loading...
GD Star Rating
loading...
Share

Solved: pfSense is not letting Tata Photon to talk to Tata Indicom Broadband

Recently I faced this strange issue at a client’s place. Users using Tata Photon USB modem were not able to browse the website and other services, hosted on a server sitting at my client’s office. The client is using a Tata Indicom Broadband connection at the office. The server is sitting behind a pfSense firewall.

To add to the confusion, users using Airtel broadband and Reliance USB modem were able to browse the website. It was easy to blame Tata for this but the culprit (well, more or less) was the pfSense firewall. Read the rest of this entry »

GD Star Rating
loading...
GD Star Rating
loading...
Share

Solved: Extension filename.php not present

The day was pleasant till I got an E-mail from a client with a PHP script file attached to it. I had to schedule the PHP script via Cron on a Linux server. For PHP scripts in Cron, I do not prefer writing the Cron job as:

1  30  *  *  *  /usr/bin/php -q /opt/script.php

Instead, I prefer a crisper line as:

1  30  *  *  *  /opt/script.php

The latter is obviously neater and readable. To prepare a PHP script to execute just by the filename, you need to do two things:

  1. Add a line to the path to the PHP interpreter at the top of the script. For example:
    #!/usr/bin/php -q
    <?php           
    // PHP code          
    ?>
  2. Make the script executable as:
    chmod + script.php

Before inserting it in Cron it is always a good idea to test the script by executing it manually as:

/opt/script.php

What always worked for me, failed on me this time with an error saying: Extension /opt/script.php not present. What will you do when you get an informative error (being sarcastic) like this? I too had no clue. Read the rest of this entry »

GD Star Rating
loading...
GD Star Rating
loading...
Share

Solved: Unable to call toll free numbers in India using Windows Phone 7

I recently purchased a Dell Venue Pro powered by Windows Phone 7. It has been about 10 days that I’m living with lack of apps, tethering, E-mail client with conversation view and a feature rich Twitter client. I’m hoping that most of these will be solved by future updates and upcoming apps.

On the other hand, I’m at war with issues on the phone due to lack of my familiarity with a Windows Phone. After all, I had been using Android for almost two years. One issue that bothered me the most was, I could not dial toll free numbers in India using my Dell Venue Pro. Read the rest of this entry »

GD Star Rating
loading...
GD Star Rating
loading...
Share

Solved: Setting up D-LINK DWA-525 (RaLink Device 3060) Wireless Desktop PCI Adapter on Fedora 14 Linux

D-Link DWA-525 Wireless N 150 Desktop Adapter

D-Link DWA-525 Wireless N 150 Desktop Adapter

My new “desktop grade server machine” at home has a 802.11n wireless PCI adapter namely D-LINK DWA-525 Wireless N 150 Desktop Adapter.  An adapter like this plugs into one of the PCI slots and connects to a wireless or Wi-Fi network. This helps to keep the machine anywhere in the house and not necessarily near a router or Ethernet port.

On my desktop, I did a minimal or base installation of Fedora 14 Linux. Fedora was not able to recognize the wireless adapter and hence could not connect to the Wi-Fi router at my home. But with some efforts, I was able to make the adapter work on Fedora 14. Additionally, I was also able to configure the wireless adapter from the command line. What follows is a crisp tutorial with the required steps to setup DIR-615 PCI adapter on Linux.

Read the rest of this entry »

GD Star Rating
loading...
GD Star Rating
loading...
Share

Install Fedora 14 Linux without a monitor (headless), keyboard and CD/DVD

As I tweeted http://twitter.com/#!/shekharg/status/30986928094453760 sometime back, I bought a new desktop for my home. This desktop (my home server) is with 16GB of RAM and with no monitor. For the monitor, I thought of hooking it up to my TV via a VGA port (a.k.a. RGB port). The machine has a DVD writer and I also bought a keyboard for Rs. 160.

I required the TV, keyboard and DVD drive only for the one time installation of the operating system. Post the installation, I access the machine only across the network – via SSH (Secure SHell) or a web browser.

But I decided against the easy way of installation using my TV and keyboard. Instead, I challenged myself to install Fedora 14 without using a monitor, keyboard/mouse and DVD drive on the server. Read the rest of this entry »

GD Star Rating
loading...
GD Star Rating
loading...
Share

Solved: Images load up partially when served by Apache Web Server

This was a very strange issue which showed up at one of my client’s Web application. The application is hosted on a Apache Web server and serves JPEG images. These JPEG files reside on a different server and mounted via CIFS (loosely called Samba mount) on the Linux machine running the Web server.

Now the issue was, many JPEG images, especially the larger ones, loaded up only partially in a Web browser (both Internet Explorer and Firefox). What made them load fully was pressing CTRL+R or clicking on Refresh/Reload several times. Bandwidth wasn’t an issue here, since this problem occurred even when browsing the JPEGs from the local network. Read the rest of this entry »

GD Star Rating
loading...
GD Star Rating
loading...
Share

Replacement battery for Android Dev Phone 1

This is a long pending post that I wanted to write. In April, after about a year of purchase of my Android Dev Phone 1 (a.k.a. ADP1), its battery started draining out. It became so bad that that I had to keep the phone always on charging. While at home/office, I used to charge it using USB/AC power. While driving, I kept it charging using a nifty car adapter.

After about a week of frustration and laziness (to search for a fix), I decided to buy a replacement battery. But the question was, whom do I contact for the replacement battery? HTC? Google? or Brightstar (the distributor) ? Phew…. Read the rest of this entry »

GD Star Rating
loading...
GD Star Rating
loading...
Share

Recent Tweets

Follow Me on Twitter