Slow Wifi on HTC Androids – The Fix!

Posted December 7th, 2010 (Updated 29 Oct 2011) in Linux, Uncategorized

Firstly the background: I own a HTC Magic (32B) running Cyanogenmod 6.1. My internet connection is 1.5Mbit down, 256k up ADSL. My router is a Billion 7401VGPR3 with strong signal and several PCs connected to it – each with flawless internet.

The issue: Around the time I bought a new Billion 7401VGPR3 router, the phones wifi started performing so badly it became unusable. DNS lookups would take anywhere in the vicinity of 45-60 seconds or often simply time out and once the download did somehow get going, it would also occasionally time out. I figured this was just an issue with the hardware in my phone – being 2+ years old, it’s getting a bit dated by android smartphone standards. I was wrong.

During my recent trip to Japan, I happened to score free wireless in one of the hotels (Ahh free wireless, how I love thee) and the wifi unexpectedly worked perfectly. Puzzled by this, I did a bit of research. As it tuns out, this appears to be a common issue with HTC phones. I came across this thread on the issue.

The fix: A few suggestions were made on how to fix it. One member suggested trying a different router, which I did (A Netgear FWG114P) and suddenly wifi worked fine. This was all the proof I needed that the Billion was the culprit. I switched the encryption scheme on the Billion from WPA2 to WEP 128 as per another users suggestion (yes, yes, I know. Flame me if you must, but I already know) and my Android is now lightning fast again.

Thank you androidforums, I was on the verge of giving up and buying a new phone but now I’m good to go for several more years :)

Read More »

Lazy Mans Guide to Chroot Jailed FTP

Posted November 26th, 2010 (Updated 11 Jan 2012) in Linux

Setting up chroot jailed FTP access on linux (especially Debian-based distros) is remarkably easy. All you’ll need is proftpd:

sudo apt-get install proftpd

Install as standalone (the default option) and once complete, make sure /bin/false is in your shells list – if not, add it:

sudo nano /etc/shells

Set up the FTP account with desired chroot:

sudo useradd <user> -p <password> -d /path/to/chroot -s /bin/false

By this point you’ll have a working FTP account but no chroot. Let’s add that now. In /etc/proftpd/proftpd.conf make sure the following is uncommented:

DefaultRoot			~

Restart proftpd service and you’re good to go:

sudo service proftpd restart

Thanks to frodon of the Ubuntu Forums for his tutorial found here.

Read More »

Lazy Mans Guide to Batch Renaming Files

Posted November 14th, 2010 (Updated 29 Oct 2011) in Linux

In this second post of my lazy man’s series, I’ll explain an easy way to batch rename files in any linux distribution with the rename command. For users of the sed tool, this will look very familiar. You’ll also need a bit of knowledge of regular expressions:

rename 's/_/ /g' *.mp3

The above example replaces every underscore with a space character in all mp3′s of the current directory. The command works as follows:

rename 's/<search_term>/<replacement_text>/g' <regex_filename_match>

Thanks to jazzmusik of the Ubuntu Forums for his little tutorial found here.

Read More »

Ubuntu 10.10 Synaptic Package Manager and ‘Mark Packages by Task’

Posted November 1st, 2010 (Updated 29 Oct 2011) in Linux

Ubuntu 10.10 was the first release of Ubuntu not to have ‘Mark Packages by Task’ working in the Synaptic Package Manager. For those who don’t know, ‘Mark Packages by Task’ is a handy little menu option that allows you to install pre-configured groups of applications very quickly – such as the Samba file server, video and audio creation suites but more importantly to us: a LAMP stack.

To get this nifty tool back where it belongs, just install the tasksel package:

sudo apt-get install tasksel

It should now be where it belongs.

Happy installations.

Read More »

Lazy Mans Guide to Tarring Files

Posted October 28th, 2010 (Updated 29 Oct 2011) in Linux

I’m a developer. That makes me lazy. Here is the code to recursively tar and untar files (with and without compression):

tar -cvf filename.tar target1 target2 #without compression
tar -cvzf filename.tar.gz target1 target2 #with compression (Just add z)

To untar, simply replace c with x:

tar -xvf filename.tar path #without compression
tar -xvzf filename.tar.gz path #with compression (Just add z)

Read More »

How to set Nautilus as the default FTP handler in Linux

Posted October 25th, 2010 (Updated 30 Oct 2011) in Linux

Update 2011-10-30: Added instructions for Ubuntu 11.04+

An issue has crept up in the latest version of Ubuntu (10.10 as of writing) whereby installing beta versions of Firefox causes the browser to become the default application for FTP addresses. This is a real annoying development that I’m sure alot of you have a beef with. There’s a very simple fix to change it back to trusty ol’ nautilus:

Open ~/.gconf/desktop/gnome/url-handlers/ftp/%gconf.xml and change the stringvalue link to/usr/bin/nautilus like so:

<?xml version="1.0"?>
	<entry name="needs_terminal" mtime="1287534317" type="bool" value="false"/>
	<entry name="enabled" mtime="1287534317" type="bool" value="true"/>
	<entry name="command" mtime="1287534317" type="string">

In 11.04+, you’ll also need to open ~/.local/share/applications/mimeapps.list and under [Default Applications] add:


Courtesy of radu cotescu.

Read More »

Caching Zend_Gdata Auth Across Pages

Posted October 25th, 2010 (Updated 29 Oct 2011) in PHP

I’ve been working with the Zend_Gdata tools lately to perform various Google Calendar operations. One thing I’ve noticed, though, is that there are no tutorials on how to cache the auth request between pages. Caching the authentication would result in one less expensive operation to an external server upon each new file request (The retrieving of a new, working Zend_Gdata_HTTPClient object). Figuring out how to accomplish this seemingly simple task proved a little more difficult than I’d have liked and ironically ended up being very simple :)

Read More »

Harder, Better, Faster, Stronger

Posted October 20th, 2010 (Updated 29 Oct 2011) in Uncategorized

Over the last few days I’ve been working tirelessly on this site – moving it to a new home and adding a server-side syntax highlighter (wp-syntax) as well as various other behind-the-scenes improvements. The result should be a faster and load and better resulting experience while browsing.

That is all.


Read More »

Doctrine Session Driver for Kohana 3 [Updated Feb 21 2011]

Posted October 14th, 2010 (Updated 29 Oct 2011) in Database, PHP

Here’s my second Doctrine 1.2 driver for Kohana 3, this time for the Session class. I wrote this because I don’t particularly like the Kohana Database or ORM classes (that or I just don’t want to take the time to learn them!) and it’s released under a creative commons v3 licence So here it is. Enjoy!

Kohana 3 Doctrine Session Driver 1.02 See here for details

UPDATE 22 Oct 2010: Bugfix release – should actually work now :)
UPDATE 03 Jan 2011: Fixed rare bug in DB cleaning function.
UPDATE 21 Feb 2011: New module at a new home! See here for details

Read More »

Deleting a Google Calendar with PHP

Posted October 13th, 2010 (Updated 29 Oct 2011) in PHP

I’ve recently started looking at the Google Calendar Data API for PHP for use in an upcoming project. It uses Zend Framework which has a pretty nice library complete with documentation here allowing for just about every operation I required…except deleting calendars (which is a bit strange, considering you’re able to create them with the API). This seems to be a limitation with version 1.0 of the API. Version 2 allows for deletion of calendars however there’s no documentation PHP implementation yet. After a long night of researching and hair pulling I’ve finally managed to come up with a working script provided.

EDIT – Now working with Zend Framework!

Read More »

Page 10 of 13« First...89101112...Last »