Coolnamehere

November 27, 2007

xcb_xlib_unlock issues – Java on Fedora

Filed under: fedora, fix, java — coolnamehere @ 1:48 am

I decided to install the Sun JDK on my new Fedora install today. Tried downloading the JDK/NetBeans self-installing bundle. It didn’t work. I got an error in xcb_xlib:xcb_xlib_unlock – something about a failed assertion. While running the installer. Drat.

Installation required skipping the Netbeans IDE and just using the self-extracting JDK archive. Then, in order to get Swing to work, I had to remove Xinerama references from any copy of libmawt.so that was in my Java install. There’s a sed script floating out there, but that wasn’t working for me. Before I spent effort figuring out sed, I edited the files from vim.

[brian@localhost ~]$ sudo vim /opt/jdk1.6.0_03/jre/lib/i386/xawt/libmawt.so
[brian@localhost ~]$ sudo vim /opt/jdk1.6.0_03/jre/lib/i386/motif21/libmawt.so
[brian@localhost ~]$ sudo vim /opt/jdk1.6.0_03/jre/lib/i386/headless/libmawt.so
[brian@localhost ~]$

In each case I executed a simple regex

:%s/XINERAMA/FAKEEXT/g

It’s the same as the sed script. I was too lazy to fix a short script that I will probably only use once.

Java’s happy now, so I’m going to go do a little coding.

July 3, 2007

Zend Framework 1.0 Released

Filed under: framework, php — coolnamehere @ 8:57 pm

PHP may not be my favorite language, but the last couple of years have seen profound improvement. I got the urge to start playing with Zend Framework last week. It isn’t too shabby. Yesterday Zend made a 1.0 release, which is a good milestone for PHP types to learn about MVC and ACLs etc. You know, other than the ones who are already using CakePHP. You’re probably doing just fine.

Oh, and I’ve been messing about with PHPUnit as well. It doesn’t feel as comfortable as SimpleTest, but I would be willing to use it in my everyday unit testing.

June 29, 2007

I’m too cheap to buy a radio alarm

Filed under: applescript, os x, unix — coolnamehere @ 8:38 am

I have trouble waking up on time. That’s probably because I have trouble getting to bed on time. You can tell I have trouble getting to bed on time, because it’s 1:40 in the morning right now and I’m writing a little blog post instead of going to bed.

I’m working on getting to sleep earlier. Hey, I might even be to bed by 2, instead of 3 or 3:30. Waking up takes a few tricks. Say, for example: an alarm clock that’s too big for me to pick it up and stuff under my pillow like a gift for the tooth fairy. A loud annoying beeping gift. How about getting a bigger alarm and putting across the room? Well you would expect that to work, but apparently I can get up, walk over to the alarm, hit the snooze, pick up the alarm, bring it back to bed, and stuff the alarm under the bed for the tooth fairy again, all without actually waking up.

Yes, one issue is that the alarm clocks are battery powered. We live in a small, old apartment, and there just aren’t enough outlets to go around. I had to unplug the lamp so that I could plug the computer in and type this.

But I have found a solution, or at least something which is not so easily circumvented. I’ve turned our beautiful iMac G4 into a glorified radio alarm. Turns out that it was actually quite simple. First I needed an application that plays music. Right, that would be iTunes. Next, I need a radio station that both of us like. Why not just use a playlist? I don’t know, I guess I actually wanted this to be a radio alarm. I’m odd. I do crazy things. I stash timepieces under my pillow, and blog in the middle of the night. Really, a radio station feed is not the strangest idea I’ve had.

Should I use our local NPR affiliate? No, I don’t think so. Light jazz mixed with news and traffic reports are not going to make us jump out of bed all energized. I decided to use my favorite college station, KEXP. The morning DJ is good, and the morning selection is fantastic unless it’s Winter and his SAD has kicked in.

I’ve got my app, I’ve got my radio station feed. Now a little AppleScript to automate the process of firing up and playing the station. I haven’t experimented much with AppleScript, but there’s no time like the present for putting a simple script together:

– PlayKEXP.applescript
– Play the KEXP live stream

tell application “iTunes”
set sound volume to 60
play user playlist “KEXP Live”
end tell

I test it with osascript PlayKEXP.applescript. It works like a charm.

Now to set this alarm so it goes off at a set time every day. This is the part where I really love the UNIXy goodness of OS X. I can just use crontab. So here’s my new crontab file:

# minute/hour/mday/month/wday/command
30 6 * * * osascript /Users/brian/iTunesScripts/PlayKEXP.applescript

Then I make sure that crontab knows about the task:

$ crontab mycrontab

This was my first time using crontab for a personal task as well. It’s awesome. Every morning at 6:30 iTunes will set the volume and start playing the KEXP broadcast.

So there you have it. It’s simple and it works. I’m going to bed now.

May 8, 2007

New content tidbits on coolnamehere

Filed under: coolnamehere, editors, ruby — coolnamehere @ 9:09 pm

I added some lightweight content on coolnamehere:

  • A new page mentioning Komodo Edit. It’s a good editor, and my editors section needs to show that I recognize the existence of a world beyond vim and emacs.
  • A quick blurb on installing JRuby. I am thinking about shifting the focus of future Ruby tutorials to JRuby, because access to the Java libraries makes it the more interesting implementation for me.

May 2, 2007

Coolnamehere is open to the Commons

Filed under: coolnamehere, legal — coolnamehere @ 9:50 pm

The contents of coolnamehere are now officially available under the Creative Commons Attribution License. I am a coding geek by profession, but my main contribution to the world at large seems to be the odd assortment of notes, tutorials, and random tangents that make up coolnamehere.com. The site has become more useful to people as it has grown and evolved. It just doesn’t make sense to keep the material locked down under traditional copyright terms. If somebody wants to redistribute the Python Babysteps Tutorial for some strange reason, I say “Let him.” All I care about is that people know I’m the original author of that particular … let’s call it a “masterpiece.”

The exact license may change over time if I decide that alteration or distribution-for-profit makes me unhappy. Probably not. I am most concerned about the form my work takes while on my site.

I do have a non-legal request, though. Please tell me when you are using my material. I am curious what contexts people find this stuff to be useful.

April 30, 2007

Further Adventures With Interactive Fiction

Filed under: coolnamehere, python, tutorial — coolnamehere @ 10:48 pm

I finished it after a couple of paragraphs, but decided to refactor the code. This installment bounces all over the place. You may find it entertaining just the same.

I know I want to continue this tutorial thread. I need to decide whether or not it will be in Python, though.

April 19, 2007

Interactive Fiction with Python, Part 2

Filed under: coolnamehere, python — coolnamehere @ 8:35 pm

Added a new piece of the ifiction.py puzzle. This time around I looked at

  • nested arrays
  • dictionaries
  • Calling object methods
  • String formatting

See here for the rambling details.

March 9, 2007

REBOL reMark

Filed under: reMark, rebol — coolnamehere @ 10:41 pm

I haven’t been on the Rebol3 AltME world for a few weeks, mainly because AltME isn’t working correctly on Linux. The only time I log on is on my OS X machine if I remember or on Windows via VMWare if I’m not too busy. Turns out that Maxim (pointillistic.com, I think) left a message for me that reMark is available for messing with. I think the idea is that you can use reMark to build static Web sites, very similar to the way that WebMake or ZenWeb do. This is Rebol, of course, so the approach is going to be a bit different.

I will be experimenting with reMark over the next few days/weeks to see what I can do with it. You can too, but remember that it is alpha and Maxim might be a little busy to do intense development on it.

February 13, 2007

Mp4Info issues

Filed under: fm, mp4info, perl, ruby — coolnamehere @ 12:09 am

mp4info thinks that my 5 minute Bob Newhart track is 2 seconds long. Looks like that is an issue on several tracks. I need to dig into that, see why Perl’s MP4::Info picks up the correct length but the Ruby counterpart does not.

February 6, 2007

Stripping out contact popup for now

Filed under: coolnamehere — coolnamehere @ 6:54 pm

The host switch broke my contact form. That’s okay, though. I wasn’t happy with it in the first place. I’m just using a plain old email link for now. Sure, it’ll put gmail’s spam filter through the wringer, but it’s quick and easy.

« Newer PostsOlder Posts »

Blog at WordPress.com.