I told my boss to hire my frands
2013-08-26 - computingOculus Rift Roller Coaster
2013-07-26 - computingOne of my servers downstairs shut itself off
2013-03-02 - computingMySQL 5.5 and InnoDB
2013-01-19 - computingWelp, this totally screwed me over today as I spent hours wondering why my Perl script's MySQL insert and update statements weren't working on some tables. If you've recently upgraded to MySQL 5.5, new tables that you create are InnoDB instead of MyISAM, and so AutoCommit must be turned on or you can just do a commit statement after your inserts and updates. FFFFUUUUUU. PHP has AutoCommit turned on by default, evidently, so it is not effected.
http://dev.mysql.com/doc/refman/5.5/en/innodb-io-changes.html
Windows administrator privileges
2012-12-17 - computingXScreensaver XFlame!
2012-11-29 - computing
RHEL 6 to Ubuntu 12.10 workstation migration
2012-11-15 - computingMy RHEL 6 to Ubuntu 12.10 workstation migration at ISU is complete! Here are a few notable notes I took note of for whomever's benefit it can be a benefit to:
- Ubuntu Minimal + plopping on xfce4 and whatever else you want actually works pretty well as opposed to just using XUbuntu. No bloat, fuss, nor mess.
- mount.cifs is in the cifs-utils package. ;-p
- ttf-mscorefonts-installer gives you pweeeety fonts
- Don't forget to keep your CUPS printer settings (http://localhost:631/). Then you can plop these into your new CUPS settings after you migrate and printing can resume as if nothing happened... ;-p
My Old Nasty Linux Workstation
2011-05-15 - computingI'm kind of a stubborn stick in the mud when it comes to my home PC. It's an AMD Athlon XP 2500+ (single core, 1.8 Ghz) with 1 GB of memory and a Nvidia GeForce FX 5200 video card. I run XUbuntu linux on it and it works fine. But then along comes Firefox 4, that has new and improved graphics hardware acceleration, and it just so happens that it doesn't work with Linux very well. Search around on Google to read about the Firefox team's bitches and complaints about making their software work with Xorg drivers. Well, it works pretty well on Linux if you've got some new fancy hardware or something. But, hey, I run Linux BECAUSE IT IS LIGHTWEIGHT AND I DON'T HAVE TO BUY NEW FANCY HARDWARE DAMMIT. :-) So, there's this wonderful web browser test page created by the good folks at Mozilla, and it's located here: http://demos.hacks.mozilla.org/openweb/HWACCEL/ Go ahead, give it a try, see what you get. It's a good test to see if A) your browser supports crazy CSS stuff and B) how well your browser performs graphically. This is becoming an increasingly more important thing since sites like Facebook are using CSS to layer things like photo collections over a web page shown in the background. Yup, that feature requires some decent CPU and graphics card and it is slower than beans on an old PC running Firefox 4. And here's my results on my lovely little home PC:
- Firefox 4 - 1 FPS
- Chrome - 8 FPS
- Opera - 8 FPS
So, guess what browser I'm using right now to type this? Opera! Yup, going back to using good old snappy Opera. Opera is pretty close to Firefox in that it has lots of user preferences AND it has that search box in the upper right that I use like 3 trillion times a day. Now I just need to figure out how to add more search selections to it. I'm sure there's a web page decidated to that. The fiendish Opera fanboi club is smaller, but about 10 times as violently loyal to their chosen browser as the Firefox club. :-) Matthew Wheelock, if you're reading this, I know you are shedding a tear of pride that I am using Opera. :-p
EDIT: Wow, to add a search engine to Opera, you simply go to whatever search site you want (like imdb.com), right click in its search box, and select "Create search". Damn, that's nice.
NVidia S-Video Problem Solved!
2010-12-04 - computingI love using the old PC sitting next to my television to watch various online videos with my family and friends. It features an old NVidia GeForce MX 4000 v ideo card with S-video out. It is perfectly matched to my old 32 inch Panasonic CRT television (stop laughing!). Yeah, I know, I'm in dire need of an upgrade. Recently, I upgraded the PC to XUbunt u 10.10, and that's when I starting having X problems. When X attempted to start, I got the following error (here's the one from /var/log/Xorg.0.log):
I gave the nv (open source NVidia) driver a try after this by simply renaming my /etc/X11/Xorg.conf file to something else. This allows Xorg to automatically assign whatever driver it deems appropri ate when X starts. The nv driver works fine, except an attempt to send video out to my TV with xrandr didn't work out. The video on the TV rolled vertically and was black and white, no matter what settings I used. Here's an example xrandr command that I used:[ 12.330] (II) Loading /usr/lib/xorg/extra-modules/nvidia_drv.so [ 12.331] dlopen: /usr/lib/xorg/extra-modules/nvidia_drv.so: undefined symbol: miEmptyData [ 12.331] (EE) Failed to load /usr/lib/xorg/extra-modules/nvidia_drv.so [ 12.331] (II) UnloadModule: "nvidia" [ 12.331] (EE) Failed to load module "nvidia" (loader failed, 7) [ 12.331] (EE) No drivers available. [ 12.331] Fatal server error: [ 12.331] no screens found
xrandr --output TV-1 --mode 800x600
Not sure what the problem was there.
I knew before the upgrade that the NVidia binary drivers worked fine in this exact setup, so I searched google for the "dlopen" error you see in the X log above. The first search result led me right to the answer on this launchpad page:
SOLVED (for 32-bit arch): NVIDIA released a new legacy driver ======================= Version: 96.43.19 Certified Release Date: 2010.11.16 Operating System: Linux Language: English (U.S.) File Size: 15.7 MB =======================You may download it here: http://www.nvidia.com/object/linux-display-ia32-96.43.19-driver.html
After installing this driver, everything is fine.
I downloaded the driver, made it executable, ran it, and then it complained that X can't be running during installation. So, I put the non-working xorg.conf in place and rebooted, which booted Ubuntu into console mode. Later, I found that using "sudo /etc/init.d/gdm stop" was a much more elegant method of stopping X. Ahem.
While running the driver installation program in console mode, it asked if a new xorg.conf should be written, and I said yes to that. After rebooting, everything was perfect. I could then use the Applications -> System -> NVidia X Server Settings program to output video to my TV just like I was able to before. Yayz!
After all this, a friend of mine suggested I try the "nouveau" driver which is supposed to be the new open source NVidia driver. It didn't seem to be a drop-in replacement for nv (X gave yet another error and died), and since the NVidia propriety drivers work great, I decided to let things be. Please write a comment if you think I should have dug into this further!
Update, December 19, 2010 - I was swapping around hard drives in a geeky frenzy this weekend and so I had to reinstall XUbuntu 10.10 on the living room PC. I noticed that when I installed version 96.43.19 of the NVidia drivers for my GeForce MX 4000 video card, it would then remove /usr/lib/libvdpau.so.1 and so that would mess up mplayer. This is really irritating because mplayer is my all time favorite media player. It is so minimalist and simple. That's the way software is supposed to be, even if it requires us to read documentation to use it (ok, maybe not all the time)! Ok, so what did I do to fix this?
aptitude reinstall libvdpau1
Alrighty then, well, problem solved. Why did this happen? Well, probably because the GeForce MX 4000 is rather old and no one really cares about it any more. Well, it works fine for my needs. With enough command line bludgeoning, anyone can usually solve any problem in Linux. Ubuntu rocks.
Installing Linux On Your Neighbor's Computer
2010-11-23 - computingWhat Do You Use Computers To Do?
Naturally, the first question I asked them is, "so, how do you use computers?" Here's a summary of what they said:- Facebook and Farmville! Whee!
- I love YouTube. Gotta have my music vids.
- The kids need the ability to research online for school work.
- Document creation for school is a must.
- Some other things like a media player and some games would be nice, but isn't terribly necessary. Music, video, and games are an online thing nowadays.
Oooh, Aaah!!
That is what they said when I came over and gave them a demonstration of how quickly XUbuntu boots up, and how quick and easy it was to navigate all the neat bells and whistles that come pre-installed. I showed them how to connect to their wireless Internet connection, how to fire up Firefox, OpenOffice, and several other popular software items. Then I told them to go crazy! Heck yeah, feel free to roam around the menus, try out all the software, install software from the massive software repository; bang around all you want because you probably can't break anything. I believe that was definitely music to their ears since they'd had quite the opposite experience in the Windows world, as I'm sure we all have had at some point. Breaking, screwing up, b0rking, and totally hosing a Windows system, that is. It's child's play. Anyone can do it. :-) I watched while the high school aged daughter fired up Facebook and she was instantly impressed with just how fast she could navigate, add content, and so on. While she was enthralled with catching up on her friend's latest activities, I rubbed my sinister hands together and slipped out the front door. "The transformation is nearly complete! bwaahahaha!", I hissed. Ok, not really, but drama makes these articles so much more entertaining. Ahem.So How Are Thing Going After A Few Weeks?
After two weeks, I dropped by to see how they were doing with their new software environment. I was expecting them to have some complaints about how they used to run Software XYZ and it wouldn't work with Linux or something similar. But instead they had nothing but good to say about their experience. When I entered the house, the daughter was watching a YouTube music video on the laptop in full-screen mode, and I was surprised at the high quality appearance of the video and how it wasn't pausing or hiccuping at all. I then asked her about how she was doing with her writing assignments and so forth. She said that it was quite easy to write documents in OpenOffice Writer, and print them (I guess she set the USB connected printer up herself). She also said that taking them to school on her thumb drive and opening them in Microsoft Office also worked, by default, without saving them in .doc format. I didn't even know that was possible! (I tried that today, actually, and it does indeed work on my copy of MS Office 2007.) She went on to talk about how her younger sister uses the Dictionary program to look up words all the time (I'd never used that program before, either). I asked her if she had any problems playing mp3s or movies, and she said she did all those sorts of things on YouTube. Just to give it a shot, I downloaded an mp3 from my home server and attempted to play it. The default media player said it was missing the correct codec to play the file, so I popped open the software center, searched for mp3, and installed the gstreamer codec package, which listed all kinds of file types that it can play. Then the mp3 played fine! Next, the family asked if I could install XUbuntu on their other laptop. I asked them if they were completely sure they wanted me to do that, and they told me they were. So I showed them how to connect to the Windows XP laptop via the Gigolo program, copied their personal documents and photos over, and then I handed the eldest daughter the installation CD and told her to install it herself! I think this brings up a couple of important reasons why Linux is good for computer users:- It breaks people out of their comfort zone and allows them to start exploring the fundamentals of computing concepts, rather than blindly following the prescribed process that Windows provides for them. Instead of mindlessly following a wizard, they think instead in terms of "where does the data need to go and how do I access it" and "what protocol do I need to use".
- Linux gives people options. If you don't like a particular distribution, window environment or piece of software, you have the power to do something else. Open source software is all about freedom and choice.
Jamie Zawinski quotes
2010-11-08 - computingI think my phone is running over
2010-10-28 - computingIntroducing the hardware security device!
2010-08-19 - computingWelp, Intel just snagged McAfee. At first I was like "uh... what? that aquisition makes no sense." But after thinking about it, I thought that it'd be kind of cool to have a security device of some kind that you pop into one of the slots on your motherboard which analyzes everything that goes through your computer, thus taking that task off of your CPU. Yeah, software antivirus takes a significant amount of computing resources. That's actually one of the top things that makes me claw my eyeballs out about Windows. People go out and buy a modern, fast PC, then they put Windows on it, and between their antivirus and all the other bloated garbage that collects on Windows, by the end of the week their running a 486. :-)
Anywho, a device that plugs into your motherboard to analyze all the crap flowing through your PC wouldn't work. The inteligence would have to be built in to your CPU and/or Ethernet card, or else all that stuff would have to flow through this "security device" and that'd be a bottleneck. Then again, adding inteligence into your CPU or Ethernet card to do that would also slow things down. Let's face it, security on your PC slows things down just like security at the airport does.
So, the answer is for OS makers and software authors to take the time to produce optimized and secure software, so that we can all stop this madness. Everyone wouldn't have to buy new PCs every friggin 3 years if software was written with more care. But I'm sure Intel isn't a cheerleader for this effort. Optimized software would mean less hardware sales! Oh noes!!!
Meanwhile, I'm happily using Linux on 6 year old hardware. :-)
The Difference Between A Disk And A Drive
2010-07-12 - computingWow, I feel retarded. I was just talking to my cow-orker (definition: http://catb.org/jargon/html/C/cow-orker.html) about our tape backup system. He started talking about tapes and drives and such and I was trying to think about the big, fat tape library machine and where all those names fit into the puzzle. And then he said, "the machine has 4 drives" and I said, "you mean, there's 4 places inside the machine where the machine plops the tapes to read and write to?" and he said "yup."
It was then that I found enlightenment.
Tapes, floppy disks, cd-roms, and DVDs are all just plain old disks/media. Media that has no built in motor to spin or move the media, and no way to read and write to/from the media. However, a hard drive has all that stuff built in to the same device. Or at least modern ones do (I don't think the really ancient ones did).
So, is it correct to say "hard disk" or "hard drive"? Well, both! :-D Both terms are used interchangeably all the time since those devices have a disk AND a drive built into the same device. Actually HDD, a common abbreviation for a hard drive, stands for "hard disk drive", which is the correct term for them.
Now go, and teach others these valuable lessons! :-p
Simple Eggdrop Bot On Ubuntu
2010-05-27 - computingThere's lots of ways to parse HTML. This is my way. :-) This script will output "DJIA: 10,123" or whatever number the Dow happens to be at. I mostly follow the Dow, so I didn't bother with the S&P data. Next, I used aptitude to install eggdrop on one of my home Ubuntu servers. Eggdrop is the world's most popular IRC bot, and it has more features than I would ever use. The next step was to follow the instructions listed in the README file, which is located here:#!/usr/bin/perl use LWP::Simple; ############################################### $url = "http://moneycentral.msn.com/home.asp"; ############################################### $html = get $url; @html = split(/\n/,$html); foreach $a (@html) { if ($a =~ /%24INDU/) { getquote(); last; } } sub getquote { @one = split(/>/,$a); $one[19] =~ s/<\/div//; print "DJIA: $one[19]\n"; }
This involved creating an eggdrop user and group, and then reading through and editing the giant configuration file (yes, this takes a while). I pointed this to an empty channel on irc.freenode.net for testing purposes, and then fired it up. Eggdrop scripts are written in tcl. I don't know the tcl language, but it appears somewhat simple. I downloaded some eggdrop scripts online that are designed for executing and displaying the output of other programs, since this was my idea for utilizing my handy dandy Perl script. Here was the tcl script I came up with:/usr/share/doc/eggdrop/README.Debian
This script will execute my Perl script (dow.pl) whenever someone types "!dow" in the channel. It turned out that this system works pretty well! My stock watching finance friends and I are now happily watching the Dow and chatting vigorously about how the economy is going down the toilet on IRC! Isn't open source software wonderful?set userflag "-" set trig "!dow" bind PUB $userflag $trig main_func proc main_func {nick uhost hand chan arg} { set fp [open "| ./dow.pl"] set data [read $fp] close $fp putserv "PRIVMSG $chan :$data" }
Dirty IT job
2010-04-14 - computingNasty RedHat Enterprise Linux 5 work PC
2010-03-30 - computingLaTeX upgrade
2010-02-27 - computingHaven't booted up Windows XP
2010-02-13 - computingOracle finalizes Sun purchase
2010-02-12 - computingBittorrent clients
2010-02-03 - computingZen Of Programming
2010-01-14 - computingNow that I work for ISU
2009-11-23 - computingRecaptcha
2009-09-16 - computingIt's Saturday and I'm working on an awful program for work.
2009-08-22 - computingI hate Internet Explorer.
2009-07-03 - computing4th of July Parade 2007
2008-11-01 - computing
IRC Database Project: An Attempt At Finding Local IRC Users :-P
2005-07-18 - computing
It's amazing just how much information about a person you can gather on IRC. In
fact, I really can't think of any other Internet resource that automatically
offers so much information about a person. From a simple IRC
/whois
you can usually get someone's name and IP address. And from
the IP address, you can deduce their ISP and location. This is all assuming, of
course, that they include their name in their IRC client setup info and that
their hostname isn't cloaked. About a month ago I decided I wanted to see if I
could build a database of IRC users so I could search for local geeks. Why?
Well, I've met local geeks before and it's a lot of fun getting together with
people of like mind. Anyway, the following is the tale of how I went about this
endeavor.
Networks and Channel Lists
It was my goal to get the largest number of IRC users possible to increase my
chances of finding people in my small region of the world. To do this, I wanted
to find only the most populated networks and channels and not bother with the
small ones. Also the larger channels and networks would be less likely to
notice any silly little IRC bots I would create to gather my data, tee hee!
Yes, I was rather unsure that some parts of this project were 100% legal :-P
Anyway, I first went to places like searchirc.com and irc.netsplit.de to find out what the world's
most populated networks were, got the hostnames of about the top 30, and then
made a simple bot (I use the POE::Component::IRC
module in Perl to make my IRC bots, by the way. Yes, I'm a lame script kiddie
XD) to visit each one and do a /list
command. Actually, before
I made this bot, I was using a program written in C (written by zer0python) that performed the /list
on a specified server, but I
decided to write my own for the sake of flexibility of features. This worked
well only about 50% of the time since many networks truncate the output of the
list
command. Meh. I then recorded all channels with at least 30
users in a MySQL database so that I would have maximum flexibility for
manipulating the data. Perl was a wise choice of programming language for this
project since it involved extensive text parsing ;-)
Venturing Into The Channels
I then wrote a bot for simply connecting to a specified channel, joining a
specified channel, performing a /who
, sleeping for about 2 minutes,
then disconnecting. After doing a few trial runs of this maneuver, I found out
that most of the networks I was connecting to cloaked the hostnames of the all
the users. Drat. I needed to have complete hostnames or ip addresses of users
or else this whole project would be rather pointless. So I set out to find out
which of the 46 networks I had gathered didn't mess with the users' hostnames
and there were only 5:
- irc.quakenet.org
- irc.undernet.org
- irc.efnet.org
- irc.freenode.net
- irc.deltaanime.net
At this point, I decided I'd better just find out the top 100 or so most populated channels of these networks, gather all those users, and go from there. So I created a script (netsplit_info.pl) to download the most highly populated channel listings for these networks from irc.netsplit.de and another script (netsplit_import.pl) to stash the channels in the database.
Lists O' Users
Next, I had to write a script to connect to a network and visit each of the channels for that network in the database. Thus I didst create *DUN DUN DUNNNN!!!* chan_spider.pl! Yes, I know, there's a lot of repititious subroutines at the bottom of that program, but I wrote it that way because POE::Component would complain otherwise. Anyway, it's just a silly Perl script, relax. :-P It's supposed to be hideous. XD And here (link removed) is the script for parsing and dumping the output of the channel spider into the database. Pretty nifty, aye?
After spidering freenode, I had about 18,000 user records in my database. But
after using the SQL distinct
function, I found that I only had
around 4,000 distinct users. This is partially because A) most users are in
multiple channels and B) my channel spider script was quite buggy and did stupid
things like performing a /who
multiple times in the same channel
and other bizarrities. I'm not sure whether this was a bug in
POE::Component::IRC or my code. If you have a comment on this, feel free to
give me a holler. :-P So, to find out whether or not these people lived in my
vicinity, I found out the netranges of local ISPs in my area using the
whois
program, which is available for all *nix operating systems.
For those of you who aren't aware, when you give whois
an ip
address, it will look it up in one of the four Network Information Centers
(NICs): APNIC, ARIN, LACNIC and RIPE NCC. The whois
program then
returns information about what ISP owns the ip address, the netrange that the ip
address belongs to, and some other information.
However, most of the user records in the database had hostnames that needed to be resolved into ip addresses before I could do an ip address netrange search. So I created a program to do that :-)
DNS Mayhem
So, I had approximately 3,000 DNS lookups to do. I couldn't do this with my
ISP's DNS servers since they might notice and shut off my net connection and
that would be a bad thing ;-p Many ISPs leave their DNS servers open to anyone
who happens to want to use them to do a DNS resolution, so I compiled a list of
several of these servers I found in the Seattle and Denver areas. 64 of them,
to be exact. I just googled for Seattle and Denver ISPs since those cities are
bound to have some pretty large ISPs and probably wouldn't notice a few hundred
DNS lookups :-P I found out their nameservers by, again, using the oh-so-handy
whois
program.
The Not-So-Exciting Conclusion
After a couple hours of dns_lookup.pl chugging along, it finished and I feverishly tried my first netrange, which was one of cablone.net's Pocatello netranges:
mysql> select * from users where ip between '24.116.152.0' and '24.116.159.255'; +-----+---------+----------+---------------------------------+-----------+-----------+----------------+ | id | chan_id | username | hostname | nick | ircname | ip | +-----+---------+----------+---------------------------------+-----------+-----------+----------------+ | 523 | 211 | furuba | 24-116-157-215.cpe.cableone.net | buckminst | buckminst | 24.116.157.215 | +-----+---------+----------+---------------------------------+-----------+-----------+----------------+ 1 row in set (0.03 sec)
Sigh. It's Bucky. Well, let's try another one! This time, lets try all the Qwest hostnames for Southeast Idaho! *types madly in MySQL!*
mysql> select * from users where hostname like '%bois.qwest.net'; +------+---------+----------+--------------------------------+------+---------+-----------------+ | id | chan_id | username | hostname | nick | ircname | ip | +------+---------+----------+--------------------------------+------+---------+-----------------+ | 4587 | 305 | tlp | 168-103-130-145.bois.qwest.net | tlp | tlp | 168.103.130.145 | +------+---------+----------+--------------------------------+------+---------+-----------------+ 1 row in set (0.02 sec)
ARGH! It's tlp! *groan* Why can't Sexy_Linux_ChiX0r be found?!?!?
Well, in conclusion, there's a lot of people on IRC.... but not THAT many. Searchirc.com records an average of a little over 1,000,000 which, spread out over planet earth, is actually pretty sparce. Ah, well, I learned a lot of nifty things with this project, even though it was a miserable failure. Ok, maybe not totally a failure... like, I can PM Bucky and tlp on IRC and say something like "w00t! my lil channel spider scriptie thingie found you!! ARRR HAR HAR HAR HAR!!!!". *ahem*