Caleb Cushing's Blog Also known as XenoTerraCide

bash and konsole

So I’ve had lots of problems using a multi-tab xterminal, for the casual user I’m sure they’d not even notice them, or think I’m silly, but when you spend all day in a shell they become less so. Historyone of the big problems I’ve had is with history. see when you close a shell then it writes the history. well if you have 5 tabs open each with with a super long history they’ll write those histories out in the order they close in.

Can't Find Google's OpenID

I think that Google’s (not Blogger’s) OpenID is a failure. It’s not memorable and you can’t find it. I’ve been trying to figure out where google has my OpenID listed for 30 minutes now. This is not the first time I’ve had to do this. I usually use Blogger’s because it uses my blog’s url, but it’s currently error-ing with a typepad blog. Why can’t google use something like google.com/username ?

KDE 4 is finally ready for users

I just installed KDE SC 4.4 last night and I can say that I feel that it’s finally general user ready. The last bug that I felt would prevent average use is now gone. What was that bug? when you pressed print screen nothing would happen. There was a workaround to make print screen work but it didn’t work out of the box. I feel that there are some things that should just work and that’s one of them.

empty() function for postgresql in sql

In PostgreSQL the ASCII NUL or empty string \0 is seen as NOT NULL. This is because postgres developers consider any characters data. I know there are better discussions on it but I can’t find them right now. Unfortunately the programming language you are using probably doesn’t see it the same way. There’s a good chance that initialized variables are set to \0 and so when you try to insert from your language to a NOT NULL field with variables that are seen as undefined in your language, postgres accepts it, and now you have fields that you probably consider to have no data but are NOT NULL.

PostgreSQL initial setup (authentication) Part 2

I ran into so problems and lack of information with my last post on this topic. Firstly my syntax for local all all to local all all ident devel doesn’t seem to work in my current setup. It’s possible that it has something to do with the configuration of the Debian/Ubuntu server I was basing that against, and now my targets are Arch Linux and Slackware. So our goal here will be to provide an alternate user that can log in as postgres via ident.

Bypassing disabled accounts with KDM

So the most common way of disabling an account in a unix system is changing the users shell in /etc/passwd to /bin/false or /sbin/nologin. However, I’ve discovered on Arch Linux that if I do this only shell login’s are disabled, I was still able to log the user in with gui via kdm. I also tried using usermod –expiredate 1. this was not effective either however. the only way I found to lock the account from kdm login was to do a passwd -l accountname, which only locks password authentication.

Difference Between a Database and a Database Instance

I was prowling StackOverflowtoday and the questionwas asked when you would use 2 databases. I’m amazed at the number of answers of replication and sharding (some under the guise of some other description). The only answer I can think of to be correct is Different Applications/Services (shared hosting probably falls under those 2 in a weird way). I’m going to explain why a replicated database and/or a sharded database are not multiple databases.

Port forwarding in OpenWRT

So you need the outside world to have access to some box’s on your internal network. first you should use Static DHCPto tell static the IP’s of the computer you’re routing to. Then you of course need to know the inbound from the outside world and the port on the computer you are forwarding too. For this example we’ll forward WAN (Wide Area Network (or (probably) the Internet)) port 8080 to a local dev box running Apache on httpd (we assume you know how to set apache up and make sure it’s working on the LAN(Local Area Network)).

Quick sha1sum with Crypto++

I’ve been working on Korama. I was originally planning on hashing each music file and using the sha1 for the track primary key. However, after benchmarking an actual implementation. I’ve decided that it’s too slow, 20 minutes for 3k+ tracks, also my program was about 5 minutes slower than find … -exec sha1sumnot sure on the reason why. However, since I had problems figuring out how to do it I figure I’ll post a basic sha1sum program that I made with the help of people on the Crypto++Mailing List.

FSDaily security fail (see image)

<img style=“display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 334px;” src=“http://2.bp.blogspot.com/_3oPDnpvYrb4/SqLUMaJclwI/AAAAAAAAABY/o-xV9JVASss/s400/fs_daily_fail2.png" border=“0” alt=““id=“BLOGGER_PHOTO_ID_5378094214676256514” />Hint, Hint! FSDaily don’t access your db with the root account. and definitely make sure that, that error page doesn’t show that to users.–This workby Caleb Cushingis licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.