Archive for the ‘dev/tech’ Category

OpenID

Friday, July 1st, 2005

I am sure everyone has learned of LiveJournal’s OpenID support by now. I imagine most people wondered how it worked, but never looked into it. After doing some research, I am quite interested in this, so I’ve decied to post a general overview of the whole thing.

Lets say you have a LiveJournal account and you’re logged in right now. You happen to be reading a blog post at say, deadjournal, and you want to reply, but you don’t have a deadjournal account. Dear lord, what to do? You can either comment anonymously, or use your OpenID. Very simply, your open id is: your_user_name.livejournal.com. Now you’re wondering how the hell that verifies your identity, right? In the [X]HTML source code of your livejournal, there is a link to the associated OpenID server, which, in this case appears as: <link rel=”openid.server” href=”http://www.livejournal.com/openid/server.bml” />. When you submit your comment, the OpenID consumer, or site you’re commenting on, pulls that server’s URL out of the identity you provided ( your livejournal homepage ). The consumer then chats with the server a little before forwarding you there. In this case, you are sent to livejournal.com. LiveJournal can then check your cookies to verify that you are logged in. If you are logged into your livejournal account, the server tells the consumer that you are indeed you. If you are not logged in, it will tell the server that you are some cheezy imposter; your comment will not be posted as you.

And the advantage of this is?… LIveJournal has an XMLRPC interface, which easily allows any non-livejournal site to verify your livejoural identity, providing you give it your password, but do you really want to give your livejournal password out to random websites? I know I don’t. With OpenID, you are still commenting with your livejournal account, but the identity verification is done via livejoural’s server. In other words: Your password does not go through a third party site. If you view the source of divinelunacy.com, you will see that I am using my livejournal account as an identity. If I were to post a comment on an OpenID enabled server, i would simply put divinelunacy.com as my openid. Easy, eh?

I find this all quite intriuging, so I really can’t wait until wordpress supports it. In fact, I might even work on making my own implementation—just another thing to add to my already mile long “to code” list…

The Riches of Google

Tuesday, June 28th, 2005

Ever since I started using my Google Personal Homepage, I have been tracking google’s stock. I believe they were at $266 or so when I started monitoring them ( a little over a month ago ). GOOG hit $306 today… Makes me wish I had some Stock in them. /me sighs…

This might come as a bit of a shock, so please make sure you are sitting… Ok, here goes: I’m booted to ‘Windoze’ right now… I haven’t booted to windows since last time I had to make a diagram for a pow. ( I don’t think I used diagrams on the last 3-4. ). My main reason for booting to windows is for photoshop. I could use the gimp, but I am not nearly as familiar with it as I am photoshop. Given my lack of artistic talent, I really need to be using an interface I am familiar with.

So now you’re wondering why I need photoshop, right? I need to make some images for this new theme. Notice how the link bar is on the right now? That is pretty much an accident, but I’m not going to bother changing that now. ( I had a little help from kubrick. ). Also, because I was doing all my work with the black theme, it is the only theme that will work with this new layout. I’ll probably fix starbucks and make a white color scheme as well. I also plan to use images for post titles, and probably for the bullets. ( I’ll probably use either sigma, omega or delta as bullets… ) If I’m not too lazy, there will be many changes to this theme over the next however long it takes me to finish. Hmm… it smells like soup in here…

Speaking of soup… I just had soup the lazy way for lunch. There was a can, a bowl, a spoon, some water and a microwave. After placing the soup in the microwave I paced around the kitchen for two minutes waiting for my soup to finish ‘cooking’, before I realized that i hadn’t yet set the microwave. ( ahh… Ooops? ).

Greg is having arguments with himself again. He hates it when he does that. Anyway… Greg doesn’t know what he will wear for his senior picture, which is to be taken in august. He figures he’ll probably wear a thinkgeek T-shirt for the potrait, but what shall he do for the creative shoot? I have thought of wearing my frame pack, or my Boy Scout uniform, but no one at school knows the Boy Scout Greg; they all know the computer geek, math-loving, insane Greg. How does one depict that? Meditate on this, Greg will…

Greg figures he’ll tell you that he’s reading A Beatiful Mind for summer reading. Greg liked the movie and highly reccomends the book which he has only read ten pages of.

Damned Hackers

Friday, June 24th, 2005

About thirty minutes ago, I was just happily surfing the internet, when suddenly there came a knock on the door… Well, actually, Firefox ( 1.0.5 Beta ) crashed on me, and sent my whole world to hell. When I tried to restart Firefox, its memory usage hit the roof and forced me to reboot. ( Firefox is not good for high uptimes ). Upon rebooting, I su’ed to root and vi’ed my system log. ( /var/log/messages ). Hoping to find something interesting, I quickly skipped down to June. I was expecting to find something interesting on June 24th, but I found something very interesting before I even got there. June 16thwas a Thursday. I clearly remember coming home and trying to use my computer, which seemed sluggish and dead. I never bothered to look into the matter. My SSH server was still up from the previous day at that point. When I was looking through the log today, I found hundreds of failed login attempts spread accross three ip addresses, each of which seems to have led one ‘attack’—clearly a brute force hacking attempt. I am, of course, too good to have my root password brute force hacked. I am also smart enought to password protect my other accounts. All of the attempts failed, but I am still quite annoyed. I am led to wonder if it was someone I know, or if it was just some n00b who scanned an ip address range for open ports and found port 22 open on my ip. A log of all relevant messages ( I wrote a script to extract them ) can be found here.

devil in me! who are you?!?!

Tuesday, May 17th, 2005

I finally finished that PHP tutorial I was working on for Ryan. It came out to only 17.5 pages, which means I left out an incredible about of information. ( I could easily add 5 more pages just elaborating on everything in it now… ) Perhaps I’ll continue adding to it just for the hell of it.

I actually felt like posting two hours ago… Just my luck… The MySQL server was down and now I don’t feel like posting and I dont’ even remember half of what I had planned on posting about.

One of those stupid viruses has been going around AIM lately. A message reading “This was cool, check it out.” is sent to everyone on an infected person’s buddy list. “This” is a link to an executable. People seem to be smart enough to click on it and run the executable… It really annoys me… I have recieved several of them in the last few days and I click everytime, just to spite them. I’m neither running AIM nor winndows—Can’t hurt me.

Alas, I once again was distracted. Ihad several paragraphs in line for the remainder of this post but they all seem to have seeped out of my mind. If I’m not too lazy, I might just think about replacing this with more bloggish informaiton…. ( when I remember… )

Ooo. I just rememberd. The title has a funny way of telling me what the post is supposed to be about. ( amazing, eh? ). I finally got around to trying VNC in linux last week. I had previously only used it with windows. I don’t really have Xvnc working the way I want ( I am using x0vncserver ), but that shall come in good time. I have gotten far enough for peeps to come in me, etc. Josh was nice enough to google penis ( safe search was on, sucker! ) and log me off of my x session. ( too bad the vnc server depended on that session.. hehe ). Ryan came in me as well… ( all he did was close my browser :’( ). I spent some time in josh and I did something mean, something very mean. He doesn’t know about it yet, but I get the feeling he’ll read this before he does. OH well… I’ll blog about that on the morrow. ( or later ) right now, it is off to bed with me.

Its that time again…

Monday, April 18th, 2005

There are always a few “rough edges” in linux… Every once in a while, I sit down and try, once again, to fix one of them. yesterday, I decided I wanted to get the remote control for my Creative Soundblaster Audigy 2 Platinum Pro ZS working. Getting the signal to be recieved and decoded wasn’t really that hard. When it came time to make the buttons actually do something, things got worse ( still working on that ). The “livedrive” sends the commands from the remote control to a midi device. In my case, this device is: /dev/snd/midiC0D1. TO check and make sure the commands were being recieved from the remote, I did: [mario@mario snd]$ cat midiC0D1 . There was output each time a button was pressed. It was then time to install LIRC. I configured it to use The livedrive midi thing. The install/compile went flawlessly. I then downloaded the config file for my remote from the lirc website. To start lircd, I used this command: root@mario lirc-0.7.0]# /usr/sbin/lircd --driver=livedrive_midi --device=/dev/snd/midiC0D1 --output=/dev/lircd. [mario@mario ~]$ irw /dev/lircd Verified that everything up to this point was working correctly. ( it Outputs the name of the button pressed each time a button on the remote is pressed. ) Ironically, I thought it would be easy from there… Making the commands actually do something is easyily setup through the lircrc file ( ~/.lircrc or /etc/lircrc ). I was able to make it control my volume using amixer:
begin
    prog = irexec
    button = Vol_Up
    config = amixer Set Master 5+
    delay = 0
    repeat = 1
end

That worked fine, but in order to release the full power of the remote, I need it to control a media player… I was able to make it control MPlayer using irxevent to generate “fake” x events. It was still not good enough for me.

Still lacking a “good” media player, I decided to try installing totem again… I’m still at that part. I finally managed to make it past the configure, but it failed during compilation. After downloading the newest sources, I’m stuck compiling the latest version of GTK+. Why does everything end up at GTK+ with me?!? Amazingly, GTK compiled smoothly. Alas, a dependency nightmere. Now I have to run along and fine ‘iso-codes’. hmm… That was easily found and compiled… w00t!!! Totem configured!!! Now compiling totem… Now cursing because the compilation failed… Now, I will spend all day trying to get some verscion of totem installed. Perhaps I will even try an RPM. I bet it would be easier to compile a gnome media player if I actually had gnome.

It just wasn’t meant to be…

Saturday, February 26th, 2005

Several weeks ago, I really really wanted access to my Linux partitions from windows. ( god knows what got into me… ). Well, I installed some extfs drivers… As if windows wasn’t already unstable enough… Explorer.exe couldn’t stay alive for more than a few minutes. Some of my files wouldn’t even ‘load’. I haven’t tried reading the linux partitions since then, and I haven’t uninstalled the drivers. Well, today, I decided to run a full virus scan, meaning all of the drives. I had obviously forgotten that my linux partitions were mounted to drives: x:, y:, z:.. After 15 minutes of scanning windows partition, the sky suddenly fell on my head. I felt like an iguana stuck in quicksand. No matter how hard I tried to stop the scan, my efforts just made me sink further into the murky instability of windows. I was drowning, when suddenly a box popped up asking me to install Flash Player. I cliked no. It came back. I clicked no. It came back . I clicked no. it came back. I clicked yes and it said “press yes to restart your computer.” I clicked no. It yelled at me. I clicked no. It yelled at me. I cliked no. Dave instant messaged me. Aim crashed. I clicked no. I clicked shutdown and then windows media player Said “Shutting down may stop the music. Are you sure you want to do this?”. I thought to myself “Yes, off to the wonderful world of linux with me.” And so, here I am back in Linux. The point of the story is: I hate windows and it hates me back.

I finally kind of finished the starbucks stylesheet for this. FFX users can view it by clicking the button at the bottom of the window or by: view>Page Style>Starbucks. Anyone who isn’t using Firefox should be.

Explorer.exe has encountered errors and has to quit.

PUD

Friday, February 25th, 2005

I spent all of yesterday working on the PUD page. Well, at least I want me to think that is what I was doing the whole day. There were, of course, distractions inbetween short periods of work. I managed to get very far in wordpressizing it. The contacts page and the news page now run on wordpress 1.5. Sadly, I think I might need to actually make some alterations to suit wordpress to this task. ( sad because I don’t want to go through the trouble. ) My work on the page is currently at: http://mario/~mario/pud

I finally updated this blog to wordpress 1.5—sexy

I went out to eat at chilli’s last night. Yay. It was good.

I went o’er yonder to greenville today! I stopped at RadioShack to buy the Normally Open magnetic Reed switch that they didn’t have and a battery. I also went to home depot and replenished my duct tape supply ( thank god ). I bought indoor/outdoor transparent again, but this time, I got 50% mas!!! ( 30 yds instead of 20 ).

An excerpt from my /etc/hosts file:
127.0.0.1      mario localhost
heeheee.

Factorials, Permutations, Etc.

Friday, January 28th, 2005

Today, I partially rewrote a program which I initially wrote last year. The program, written in c++, deals with combinations for a combination lock. It has several different modes available, allowing one to make one number constant, or display only combinations containing a given number, or numbers. Naturally, I had to check the programs work, so, for the hell of it, I will post that here. ( yeah, I know, I am weird. )

mode 1: list all possible combinations.
. No digits are allowed to repeat, so this is simply (50)(49)(48), or 50!/47!

Mode 2: list all possibilities where the xth number is constant.
This one is a little bit harder, but still, not all that hard. It is given as: (50)(49), or 50!/48!.

Mode 3: list all combinations containing x
This one is a little bit harder. 3!(50)(49)(1)/2!. The three factorial comes from the fact that the three numbers can be permuted three ways. The 2! there is because we are dealing with combinations. (all digits unique)

That was really poorly written… I’ll post something less educational tomorrow…

Lethargic

Monday, January 24th, 2005

Everyday, I tell myself I am going to post today; Everyday, I think of something to post about. For some reason, I never end up posting. I think I am too lazy to post or something, but it is either that or force myself to clean my room at the moment… Now, this post is just putting of the inevitible cleaning of the room ( and… Why must drum sets and computers attract all the dust? ).

Since I last posted anything informational/mildly journal-like, I switched from my 10% mandrake, 90% I compiled myself to Fedora Core 3. For some reason, SELinux wasn’t completely working for me. I had the SELinux patched version of init compiled and installed, as well as util-linux, pam and openssh. ( Yeah, before the pam, I was using shadow passwords. I ended up booting to a rescue Cd several times to fix things, but in the end, it was all good. ) The main reason I switched is because I got really pissed off at Mandrake’s Glibc. There was a problem with md5.h being non-existent ( at least, I think that was a problem. ) I tried to compile Glibc from source… which is where things really bad. There was a problem compiling, probably something I could have fixed with a dependency or something, but I just got really mad at it…. I ran make, with the -k option. I built all of Glibc with -k, then I installed with -k, knowing that things would most likely be messed up. I broke all My c applications. basically, the only applications I could run were the ones that I already had running. Luckily, I had gaim runing at the time, so, I was able to seem half alive anyway. I could not open any new shells ( bash… hehe.. ). Luckily also, KDE is written in C++. Now, I am happily running Fedora Core 3, but trying to install over as many things as I can. ( well, delete it then install a self-compiled version ). SOmething along the line somewhere prompted me to switch to Vsftpd. It seems to be really fast, as everyone says, and the download was very small. I definitely lost features I had with Proftpd, but from what I have seen with Vsftpd, it is more efficient in many ways. Also, somewhere along the line, I was prompted to switch to X.org.

The most depressing part about switching to Fedora was definitely the prospect of facing more GTK+ compilations… They went without trouble this time. The whole package, and its dependancies installed without a single error.

Things aren’t all better now… I am facing some oscure library error when I try to install firefox. The same error Occurs when I try to run UT2k4. After scouring the internet, I was unable to find any useful information about it, but I will have to keep trying. It seemed to be a problem with the GCC install, so I compiled fresh from source to no avail… As if having errors trying to install a precompiled firefox isn’t enough, there is also some annoying error trying to compile from source. Luckily, though, Fedora core 3 comes with firefox installed ( although, it is the 1.0 preview )

As part of the switch to Fedora, I wiped my whole root partition, and reformatted it ext3… now, I can’t get my 2.6.10 kernel to boot. I’ll have to look into that. Well, compilng and installing lilo went fine. I can’t stand grub for the life of me… Now, that was a very long discombobulated post… *skips the proofreading*

*edit: Thanks to josh for downloading and and burning Fedora for me :)

Your base is my command

Wednesday, December 15th, 2004

Ever used one of those cheap online ASCII->Binary converters? I’m sure we all have… Sure, they work, but they just aren’t cool. ASCII is a 7-bit code, which means that 7 bits at most are needed per character. Most of the online translators pad every 7-bit chunk with an extra bit to make it an 8-bit byte. I just can’t stand that… Just one of those things. Another thing… Ever seen an ASCII text to ASCII base 13 converter? Well, I just wrote nice little program to convert into any number system. ( 2 through 36 ). And alas, no more zeroes than needed. The progam calculates the string length of 127 in the desitred base and pads every “character” so it has exactly that many digits. whoopeee. In my eyes, the only down side is the cheap interface. IT