Drupal .htaccess and password protecting folders (401 and 404 problem)

http://www.thesitewizard.com/apache/access-non-drupal-folders.shtml

I was trying to password protect a subfolder of this website (nevermind which one). The problem was it kept giving the Drupal 404 error (The page you requested was not found.). The solution is to specify a 401 ErrorDocument line:

ErrorDocument 401 401.html

and create that file (touch 401.html).

That fixed it.

Michael Schumacher is The Stig!

Watching Top Gear at the moment. Apparently the Stig is Michael Schumacher!!!

He also might not be!!!

http://en.wikipedia.org/wiki/The_Stig

Fedora 11 Slow Internet Access/DNS Lookup

I just wiped Ubuntu and installed the new Fedora 11 on my Toshiba laptop. More on Fedora 11 later but one thing I noticed straight away was the ridiculously slow internet. It seemed to be slow on the 'Looking up' website part of loading a page. A quick google brought this forum entry: http://forums.fedoraforum.org/showthread.php?t=221969

The solution? Go to about:config in your address bar. Filter for ipv6 and enable network.dns.disableIPv6 (set it to true).

Much better!

Netgear DG834G and Xbox Live / PS3 / Fifa 09 Online not connecting / lag

Most of the time people say they have a networking issue I suggest updating the firmware. This time I suggest downgrading.

Since installing a DG834G at home my online gaming has been abysmal. I spent some time playing about with port forwarding/upnp etc but no luck. A quick search online showed a few forum entries where people mentioned the firmware I was using (the latest) seemed to be the cause. I downgraded from version 5.01.14 to 5.01.09 - immediate improvement.
Strange but true.

Print Arrays nicely using pr

I recently had to do some debugging of arrays. Print_r() is very, very ugly:
Array ( [0] => struct SidAndAttributesType { string SecurityIdentifier; unsignedInt Attributes; } [1] => struct NonEmptyArrayOfGroupIdentifiersType { SidAndAttributesType GroupIdentifier; } [2] => struct
I did some research and found a nice solution: use pr() instead of print_r.
Array
(
    [0] => struct SidAndAttributesType {
 string SecurityIdentifier;
 unsignedInt Attributes;
}
    [1] => struct NonEmptyArrayOfGroupIdentifiersType {
 SidAndAttributesType GroupIdentifier;
}
    [2] => struct NonEmptyArrayOfRestrictedGroupIdentifiersType {
 SidAndAttributesType RestrictedGroupIdentifier;
}
Shorter, simpler, sweeter!

App of the Week: Netlimiter

Have you ever wanted to see what program is sucking up your bandwidth? Have you ever wanted to apply limits to how much bandwidth programs can use (like torrent apps)?

Then Netlimiter might be your solution.

already under version control svn aptana

Have you got the "already under version control" error message when commiting or trying to add to a repo from aptana? I found it was because I had copied folders from another part of my project that was already in SVN. It also copied the .svn folders so Aptana thought it was already in the SVN. The fix is to delete the .svn folders (don't forget they can also be in the sub folders).
find ./ -name ".svn" | xargs rm -Rf
Source: http://cephas.net/blog/2007/04/06/command-line-script-to-delete-svn-files-folders/

Ubuntu nvidia xorg settings not saving

If your xorg settings aren't saving after running the Nvidia X Server Settings program try running it using sudo (sudo nvidia-settings).

Cakephp set page title

To set the page title in cakephp, put this in your controller method:
$this->set('title', 'My Page Title');

Cakephp home.ctp/index controller and a controller without a model

1) Create a new controller (the one below has no model)
class DashboardsController extends AppController {
	var $name = 'Dashboards';
	var $uses = array();
		function index() {
 
	}
}
2) Reroute in routes.php in the app folder.
 
Router::connect('/', array('controller' => 'dashboards', 'action' => 'index'));
Syndicate content