Categories
Computers Programming

Bare git

It’s been awhile since I’d learned anything interesting regarding git. Frankly, my needs are modest and I’ve been making due with my current work flow. My only real problem was every now and again, I’d run into trouble with merges.

Turns out, there was a perfectly reasonable explanation.

I didn’t know what the hell I was doing.

Categories
Computers Programming Python

python-markdown Typed-List Extension

I’ve contributed a bit to the python-markdown project in the form of bug fixes. Today I finished creating an extension that allows python-markdown to recognize list types and generate code with the appropriate list markers. For instance, lists can be marked with upper or lower case letters, or upper or lower case Roman numerals.

The git repository for the extension is available here.

Categories
Computers Programming Python

Down and Dirty Mail Notification

Following is a simple new mail notification implementation for the awesome window manager that leverages procmail. It’s main virtue is simplicity: there are about 20 lines of python code, 1 procmail recipe and several lines of code required in the rc file for awesome. The result is a numeric count of new email displayed in the statusbar.

Categories
Computers Programming Python

Python 2.7 Upgrade

This is one of those posts where I’m setting a marker for when the sh** hits the fan, so to speak. There are no deep dark secrets revealed here, though there is some geek talk after the jump. Don’t say you weren’t warned.

Categories
Computers

More Oracle versus Google

This here post is certainly comprehensive and well hedged. The first half or so can safely be skipped if all you’re curious about is an analysis of the alleged patent violations.

The author’s bottom line is that Android will remain. The question being whether and how-much Google will have to cough up to Oracle. After reading the analysis, I inclined to believe that lawyers have a helluva time understanding the nature of software; thus, Oracle may well have bitten off more than it can chew.

Categories
Computers

Oracle vs Google

Well, this story will likely be the tech talk of the day. Oracle, which purchased Sun Microsystems and now owns the Java programming language, had sued Google for IP infringement. I haven’t found any more detailed analysis at this point, but it’ll be interesting, to say the least. The only thing at stake is the fate of Android OS, that’s all.

I recall reading (ahh, here it is) an article on how Google had cleverly avoided violating (at the time) Sun’s licensing. The gist, if I understand it correctly, is the virtual machine used in Android does not interpret normal Java bytecode, but an entirely different byte code. So they are just using the Java syntax, but not claiming it to be a Java platform and, in fact, it’s not because of the Dalvik VM. Thus, they’ve side stepped the licensing.

I don’t know enough about the patents surrounding Java to know if the language itself is considered IP. Further, I believe that Java has been open sourced- although I don’t know if Oracle’s purchase of Sun change that. Again, no idea how that fits (or if it does at all) into the equation.

I’ll have to keep an eye out for some analysis.

Categories
Computers

grub_xputs Addendum

A week or so ago my computer failed to boot, giving me an error stating that ‘grub_xputs could not be found.’ My final solution ended up being straight forward and I was up and running again fairly quickly. However, I had a commenter drop by who was unable to resolve the issue on his side, despite trying some grub command-line incantations. As a result, I’ve continued to kinda follow the problem, curious as to a final fix.

I don’t think there’s, as yet, a formal fix. My guess is that it should be possible to fix the grub install with an install image. But I also found this fix which involves using a liveCD. Keep in mind that I have not tried it myself so I can’t vouch for it personally, but I thought I’d point it out for others who happen across this spot in search of some kind of solution.

I’ll note that the solution is not related to the grub_xputs issue. But the end result is a newly installed grub2, which is essentially the requirement to fix the problem.

Categories
Computers

php5 and apache2 and public_html directories

I finally got around to setting up WordPress on my home server for purposes of tinkering. I decided to install the blog in the public_html directory in my home. The apache2 webserver was already installed and I knew that browsing to the public_html folder worked just fine.

But when I tried to access the WordPress install page, all the browser wanted to do was download it as a text file.

Hmmm.

So I stuck a php file with phpinfo() in the public_html folder and tried to access it. Same result.

OK. So I check for a few things using aptitude and checking the enabled modules in the apache2 setup directory and it looks like everything should work. So I decide to stick the phpinfo() code into a file under /var/www since that’s the document root.

VOILA! The PHP info page pops into view. So, for some reason, PHP is disabled for public_html folders on my machine (a debian/testing installation). Some quick googling turned up the culprit. It was 5 lines in the php5.conf file under the apache2/mods-available directory:

<IfModule mod_php5.c>
    <FilesMatch "\.ph(p3?|tml)$">
        SetHandler application/x-httpd-php
    </FilesMatch>
    <FilesMatch "\.phps$">
        SetHandler application/x-httpd-php-source
    </FilesMatch>
# To re-enable php in user directories comment the following lines
# (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
# prevents .htaccess files from disabling it.    
#    <IfModule mod_userdir.c>
#        <Directory /home/*/public_html>
#            php_admin_value engine Off
#        </Directory>
#    </IfModule>
</IfModule>

As can be seen, there’s even a handy little explanation! After commenting them out and running /etc/init.d/apache2 restart I was finally able to install WordPress on my home machine. Kinda blew the whole “5 minute install” thing though.

Categories
Computers Programming Python

Python Class Attributes

While working on a piece of code, I ran into an unexpected bug- in my program not Python. I’ve since done some investigating and I’ve learned something about how Python deals with class attributes and instance attributes. Following is a little exposition of what I’ve learned.

Categories
Computers

Jumanji and Zathura

Yes, they are both movie names. Jumanji was OK, never saw Zathura- although it just looked like the writers said “Wouldn’t it be cool if we cool if Jumanji had been done as a space game?”

But I digress- they are also most excellent pieces of software. Jumanji is another one of those minimalistic browsers along the lines of uzbl and surf. Zathura is a pdf viewer which I think capable of replacing xpdf. Both applications are very fast and very configurable and both seem to handle the majority of use cases for myself.

My only warning is that the documentation is a little thin. Both can be downloaded from the appropriately acronymed pwmt.org where you can either use git or download tarballs. If you’re wondering about the acronym thingy, you’ll have to pay the site a quick visit.

Categories
Computers

Grub Rescue Mode on AMD64

We had a little power outage last night so when I came down this morning, the computer was, naturally, off. Turn it on, wait for boot process to complete only to see the wonderful words:

Attempting to enter rescue mode

error: the symbol ‘grub_xputs’ not found

grub rescue>

Lovely way to start the weekend.

Categories
Computers

Reality Distortion

Apple’s defense now, after the press conference on Friday, it to claim that all phones have attenuation problems. They even have video! John Gruber is in overdrive on the situation, with multiple links to videos with other phones who lose a couple of bars due to a “death grip.”

These are in addition to Apple calling out RIM and Nokia at the Friday press conference regarding a couple of their phones. They even posted some video showing how the signal gets attenuated, presumably causing a call loss.

It’s a good example of “the best defense is a good offense” and also of attempting to drag everyone else down into the muck. After all, if everyone else is guilty, then why single us out for scorn?

Categories
Computers

Apple Press Conference

Don’t know about the rest of you, but I’m breathless with anticipation for Apple’s press conference today about the iPhone4. I barely slept last night thinking about it.

Apple’s predicament strikes me as a textbook case where a company has to simply accept defeat. The story has clearly taken on a life of it’s own and, regardless of Apple’s insistence that overall reception is improved, the perception is that the iPhone4 (fairly or not) has antenna issues. To not accept this reality means Apple will continue to get hen-pecked to death by critics saying “there’s a problem” while Apple continues to deny or belittle. That is a battle they cannot win.

So in order to turn the tide, they have to grit there teeth and accept the fact that a not-insignificant portion of their user base is seeing a problem. A solution is to offer a case or cover for free to all current iPhone4 users as well as hand out a free one with future phones. Perhaps they’ll have a better solution.

Regardless, they have to take ownership of the problem and make it crystal clear that they are doing so. If they don’t their problems will only get worse.

And with that, back to breathlessly anticipating…

Categories
Computers

DISAPPOINTED!

Hadn’t used the EEE for a few days. Fired it up to do a little maintenance, couldn’t log in as root– I kept getting a password failure. So I tried to type the password into a normal terminal line. Half the letters weren’t working. So my keyboard, for some reason, is kablooey.

Again.

Words to describe my frustration do not exist.

Categories
Computers

fetchmail daemon mode

My desktop has been doubling as the home email server for awhile now. Towards that end, I’ve been running fetchmail to grab stuff off various POP servers and then running it through a vanilla install of exim to get it to the local accounts on my end. I had been using it out of cron- which took some doing because there’s the chance for user’s cron jobs to step on one another.

The combination of coordinating the cron jobs and managing separate fetchmailrc files caused me to finally rethink the setup. I don’t generally like to mess with stuff that’s working, but there seemed to be a reasonably painless path forward. I could merge all the individual user fetchmailrc files into a single one and then run fetchmail in daemon mode, as opposed to cron. The end result is after the jump for those interested, and as a marker for myself when something goes awry.

Categories
Computers

Yahoo Plus Email Wrapup

Alright, I’m considering this issue resolved and, thankfully, with nothing nefarious going on. I found a thread, here related to gmail and the problem description is identical. In particular, the comments from ‘Witekb’ are illuminating. After the jump, I have an explanation for what was going on.

Categories
Computers

Yahoo Plus Mail

NOTE: This issue has been resolved to my satisfaction, see the next post for details.

I posted yesterday about an SSL error I was getting while trying to connect to a mail server. The error hasn’t gone away, and I now see that others are also seeing problems. So I figured I’d post what I’ve done in my attempts to get a handle on what’s going on.

I’ve done a number of things to try and verify what I’m connecting to and if the error is valid or possibly a bug in fetchmail. I’m leaning more towards “valid” at the moment. Here’s what I’ve done.

Categories
Computers

Minor Email Issues

Not for me, for the Wife. She has a POP email account that she’s maintained and used for years now. Being the local computer expert, I’ve setup our system so as to streamline her email experience. Basically, that means downloading her emails to a home based server and then making them available to her. The nice thing about the setup is that she can easily access her email from her laptop or desktop without worries about synchronizing.

The other benefits for her is that I get to deal with the headaches that inevitably arise. A curious one has been happening for the past couple of days.

I’ve setup my server to download from the email account using SSL. Yesterday, I started getting warnings that the downloads were unsuccessful because the name of the server on the certificate that was being sent did not match the name of the server that I’m connecting to. Curious, as the system had been working for years now without a glitch.

So I updated the certificate authority database on my server and that seemed to resolve the issue. No more warnings, until this morning.

So I got on a chat line with a Yahoo tech guy who, unfortunately, was not entirely helpful. I tried to explain to him about the names not matching between the certificate being sent by their server and the server name that I’m using to connect to. He didn’t seem to grasp that and instead had me checking port settings and the like. After I humored him by connecting and downloading without using SSL (in other words, everything was sent in the clear) he told me to contact my ISP about them blocking the SSL port.

This was rubbish- the server has no problems using SSL to download from a variety of POP servers so there’s no way the port is blocked. So after disconnecting from the chat, I went back and setup everything again to download using SSL. It worked again.

Curious.

Frankly, I was beginning to smell something fishy, so I went and changed her login password for the POP account. I updated the password here and tried again and everything still seems to be OK. So at this point, all I’ve got are suspicions as to what might be going on. Something to keep an eye on.

Categories
Computers

Wi-Fi As a Disruptor to Cell Service Providers

Eric Raymond has been writing almost exclusively, of late, about the future of cell phones. Particularly as it relates to Android versus iOS and which one will ultimately become the dominant mobile OS. Along the way, he’s noted a couple of times that he believes that smartphones will ultimately lead to cellular providers becoming basic “bit haulers.” As I read this post from John Gruber about Facetime on the iPhone 4, I’m wondering if the pieces aren’t coming into place that might force this issue in the nearer term.

Categories
Computers

Fix for cifs mount error

I have autofs setup on my machines so I can access some shares on a WinXP box without having to worry about entering cryptic mount commands. A couple of weeks ago I discovered the shares were not accessible. Which I found… frustrating. I worked at it briefly and wasn’t able to come up with anything at the time. Today, I finally got back to it and was able to rectify the situation.