Archive

Author Archive

Securing A Directory With .htaccess

October 6th, 2008

It’s actually quite simple.

Create a .htaccess file in the directory with the following contents:

AuthUserFile /directory/containing/.htpasswd

AuthName “Title for Protected Site”

AuthType Basic

Require valid-user

To create the .htpasswd file, simple use the following command:

htpasswd2 -c .htpasswd hayden

And it will create the appropriate .htpasswd file in the directory you are in.

sloik2004 Lab Notes

Madwifi in Opensuse 11… Again

September 22nd, 2008

This guide is WONDERFUL for this problem.

http://www.susegeek.com/wireless/unable-to-set-atheros-wireless-card-with-madwifi-in-opensuse-110/

sloik2004 Lab Notes

Setting Default Sound Card in Ubuntu/Kubuntu

September 4th, 2008

I too was vexed by this problem. My preferred soundcard is my SBLive! but I use the VIA chipset based soundcard on my motherboard for VoIP stuff. Kubuntu was always making my VIA soundcard the default.

The solution is a bit obscure but it works.

Do:

sudo asoundconf list

I got back:

Names of available sound cards:
Live
V8237

I then did:

sudo asoundconf set-default-card Live

followed by a reboot to test.

Sure enough, the Live is now set to default. It’d be nice if there was a simple config app in the KDE configuration panel that did this.

sloik2004 Lab Notes

Tribes 2 Bots

July 12th, 2008

I’ve been messing with the bots in Tribes 2 a lot, and I’ve found these two documents to be somewhat helpful:

http://sloik.ezwebtogo.com/downloads/T2cmdlist.txt

http://sloik.ezwebtogo.com/downloads/botfuncs.txt

sloik2004 Lab Notes

MadWifi Problems in OpenSuSE 11

June 29th, 2008

Apparently the packager for MadWifi has messed up the version numbers for their OpenSuSE wifi driver packages.

A solution can be found below.

http://forums.opensuse.org/network-internet/wireless/386427-madwifi-kmp-issues-11-0-a.html

sloik2004 Lab Notes

Checking RAID Status

June 6th, 2008

To check the status of my server’s RAID array, I’ve found the following command to be useful:

# /sbin/mdadm --detail /dev/md0

sloik2004 Lab Notes

Pulseaudio Not Remembering Default Sound Device?

May 19th, 2008

The solution is simple! Look to this thread:

http://www.fedoraforum.org/forum/showpost.php?p=948028&postcount=5

It’s as simple as shutting down and restarting the Pulse daemon as soon as you’ve got everything set up the way you like it. Otherwise, when you log off or shut down, the daemon is killed before it can save its settings, reloading the defaults on the next boot.

Pulseaudio daemon won’t save it’s settings to ~/.pulse if just killed when exiting your login session. It will only save if you kill the daemon with pulseaudio -k command. So I had to add a 1-line script (/usr/bin/pulseaudio -k) to /etc/kde/shutdown directory. Now it works.

sloik2004 Lab Notes

Change Java Version…

May 19th, 2008

To change the Java version you’re currently using under Fedora 8 (and maybe other distros) run the following command as a root user. Take note: this command is in /usr/sbin/, so just running it through su may not work.

update-alternatives –config java

sloik2004 Lab Notes

WG311T Connect At Startup – OpenSuSE

May 17th, 2008

This was a bit annoying, but eventually was easy to fix according to this thread:

http://www.suseforums.net/index.php?s=5bb4454b3b055089ec6b1deae9bb940c&showtopic=49571&pid=244126&st=0&#entry244126

There’s a boot script at /etc/init.d/boot.local. Add
modprobe ath_pci
sleep 5
ifup ath0
sleep 5

sloik2004 Lab Notes

Batch Processing Recursively In Windows

May 14th, 2008

It’s so much easier in Linux, but this page finally revealed what it takes.

http://kennethhunt.com/archives/000173.html

Recursive Find Text String In Files, Output Line Number:

FOR /R c:\~kenneth %v IN (*.css) DO find /N /I “#banner” “%~fv” >> test.txt

sloik2004 Lab Notes