Code

52 posts

Going Mobile

I like the layout of this site, but it doesn’t translate well to mobile devices.

Desktop Site on Mobile

When I wrote the theme, I rendered the elements in percentage units, rather than as fixed measurements. As a result, resizing the window allows text to reflow naturally. On the mobile version of Chrome, this works well, as zooming the body text adjusts the flow. However, the sidebar and header text are nearly impossible to see. Firefox simply zooms in on the text, without adjusting the flow.

So, I’m left with several options. The first is to change the structure of the site to be more compatible with phones and tablets. That’s not very desirable, as it’s going to lose functionality on the desktop. The second is to serve up a different theme for mobile devices. This entails maintaining two different versions of the site. No thanks.

The third option involves a WordPress plugin called WPtouch.

Simple Conky Config

Conky CPU Conky RAM Conky Network

Conky’s a neat tool. It’s not as ornate as Gkrellm was back in the day, but it makes up for that in adaptability and a light resource footprint.

Is it necessary when most desktop environments have similar utilities? Perhaps not for most, but I like having the relevant information close at hand yet unobtrusive.

This configuration is fairly simple, though you might need to tailor it a bit to your machine.

If you have fewer than four cores, you can simply delete the irrelevant lines. The mount points for filesystems will be different, so be sure to specify your mount points and drive names.

The network interface on my machine is wlan0. Change ${addr wlan0} to whatever value your machine uses.

The actual file is here. The easiest way to use it is to save it as .conkyrc in your home directory, then call it with: conky -c ~/.conkyrc .

Fixing Thunderbird’s Link Issues

I recently noticed that clicking on links in Thunderbird fails to open a browser window. It worked a few days ago, so I’m guessing a recent update must have had something to do with it.

There are bug reports, and there are quite a few workarounds, some of which are complex and none of which are elegant.

Nor are they necessary. The problem is caused by Thunderbird’s network protocol handlers.  In 13.0.1, the warn-external entries are all set to false for some reason. Go into Preferences, then click on the Advanced tab. Click on the “Config Editor” button and confirm the dire warning.

Search for the phrase “handler.warn,” and change the values referencing http, https, and ftp to “true” by double-clicking.

Close the windows. Next time you click on a link, Thunderbird will ask you to choose a browser, and you’ll be set.

I’ve no idea why it’s going out the door that way, but at least it’s an easy fix.

How Erik Got His Gnome Back

I recently purchased one of the Acer Aspire notebooks. It’s small enough that I don’t feel like Sisyphus dragging a rock up the mountain, but large enough to actually be useful. I got it home, wiped Windows, and set about installing Ubuntu 10.04 on it.

I like 10.04. It’s still got the Gnome 2 environment, which I find to be a great balance between usability and attractiveness, and I’ve absolutely no need to upgrade. However, the Aspire uses a newer Atheros AR9485 wireless card, and it’s not supported under the 2.6.32 kernel.

Crap. That means upgrading to 3.0. That means upgrading to Ubuntu 11 and losing Gnome 2 for the mess that is Unity. Do let’s start gnashing teeth and listening to Elliot Smith records now.

I did scads of research, and there is simply no way to get Gnome 2 working under Ubuntu 11. There’s a fallback configuration for Gnome 3 that looks a bit similar, but it’s not the same.

Continued...

Black Hattery

While going through my server logs a week back, I noticed some odd traffic. The site was getting hits from keywords like “Viagra” and “Cialis.” This is strange, considering that I’ve never really had much interest in, ahem, male enhancement products. When I checked my site in Google, I found this bit of oddness:

I did some research, and the diagnosis seemed to be that the site had been hacked.

Except it hadn’t. I went through and checked for all of the usual symptoms, but found none. File permissions and timestamps were unchanged. There was no unusual FTP traffic. My database was clean. I followed Chris Pearson’s advice and checked for rogue files. There were none. I ran Cotton Rohrscheib’s scripts against everything, but I found no base64_decode functions other than where they should be. My theme files are hand-coded, so it was a trivial matter to rule out tampering.

Continued...

The 1990’s Are Now Officially Over

Geocities has closed down.  Frankly, this came as a bit of a surprise to me, as I didn’t know it was still around.

The whole service represented everything that was wrong with not only web authoring, but the whole idea that anyone could (or should) do it.  It gave people a venue to publish whatever they wanted, no matter how inane, vapid, or just irrelevant.  The result was that people who could barely write a sentence in their native language were now all “webmasters.”

Webmasters!  Talk about empowerment.

Cybersecurity Act of 2009

Some guy yelled at me about this today. People seem to yell a great many political things at me lately. Frankly, it’s all quite tiring. Anyhow, this doofus went of on an unsolicited rant about how President Obama was going to “shut off the internet at will.”

Man, I thought, I gotta know how he can do that. So, I googled (is that a verb now?) “Obama shut down internet,” and I was led to the documents for the Cybersecurity Act of 2009. The actual bills are S. 773 and 778. The first draft is here [pdf].

I skimmed through it and found that it echoed almost everything I’d heard about last year’s CSIS report. Basically, the report acknowledged a few things that should have already been glaringly obvious:

  • That our government’s computer infrastructure is vulnerable to attack and disruption,
  • That you can trust Congress, who are experts on these things, to throw tons of money at it if you like, and
  • It won’t do much good.

Continued...

Spring cleaning and a format change

First, the good news. Neil Gaiman reads this site, which is really quite a compliment, since the man is one of my favorite authors.

He’s worked in several genres, but I first came across his work when he was collaborating with Dave McKean in the classic Sandman series. The two did several books together, my favorite being the strange and moving Mr. Punch. He collaborated with Terry Pratchett in Good Omens, and he’s written several great novels, including American Gods.

William Gibson, one of the defining authors of the “cyberpunk” movement and author of the classic Neuromancer, also reads here.

I’m also referenced on this very odd site. I’m not sure what’s going on, but the idea that ninjas may be acting on an extraterrestrial level certainly gives me pause.

Why I’m thankful for spam filters

RTFM, courtesy of GoopyMart

They save me from wading through nuggets of wisdom like this, from akryr@hotmail.com:

WTF?!?!! I try to register on your site but it doesn’t work…98% of the world uses Explorer, so get over it LOL! It’s only like 10% use Firefox!

No, really. Some people really have nothing better to do with their time. This is why I don’t cater to IE on the site. It just brings out the worst in people. To those who insist on using it, I have only one thing to say:

perl -e ‘print $i=pack(c5, (41*2), sqrt(7056), (unpack(c,H)-2), oct(115), 10)’

Waving, not drowning.

No, the site wasn’t hacked. Stop asking. I’ve been using an old version of WordPress (1.6 IIRC) to manage content, and it looks as if it finally gave up the ghost.

To be honest, I hadn’t even moved up to 2.0 a year back. I’d stuck with the older version because the bulk of formatting and scripts for this site are handmade, and I was worried that upgrading would make a mess of things.

Explorer and a:link

I don’t know why I keep trying. As Homer Simpson once observed, “trying is the first step towards failure.” I think he was onto something.

I had a stylesheet that I liked and almost worked with Explorer. Almost. There are three nagging problems, though.

The first is with linked images. I’ve defined the default link color as a pleasant green to match the site layout:

a:link {
color: #5e882c;
text-decoration: none;
}

Comcast’s designs on the internet

I’ve had problems with Comcast as a customer. Sometimes big problems. Most recently, I noticed huge amounts of lag on my connections and interference on the phone lines. Most troubling was the type of problem I was having. The connection would be fine, then it would throttle down to zero over the course of a few minutes before restarting.

That’s usually a sign that it’s being managed and rationed.

Bowing out of the Browser Wars

I think it was Sartre who once wrote something along the lines of, “walking away in disgust is not the same thing as surrender.” Or maybe it was Camus. I’m pretty sure it was one of those Existentialists. Or maybe Absurdists. Probably just a little crazy, too.

In any case, insanity is defined as the practice of repeating the same action over and over again, expecting different results. That’s kind of my relation with Internet Explorer.

More fun with IE and CSS

This CSS code can crash Internet Explorer 6 if embedded in a page:

<style*{position:relative}style<table<input /table

IE7 appears to load the page, but if you open a new tab, it crashes on navigation.

Try it here. You’ve been warned. Firefox, Opera, Safari and text-mode users aren’t affected.

I can’t take credit for this, unfortunately. Hamachiya discovered this a few days ago, and it’s repeated here. Apparently, mshtml.dll looks at it as a rogue request and closes down.

This is another unfortunate example of Explorer’s continuing inability to handle the most basic of standards. Of course, it’s bad code, but the browser should know enough to disregard it.

I still get “Your page l00ks teh gay in Explorer” emails, and in response, I’m tempted to embed that code in my stylesheets. It seems a bit ham-handed and capricious, but still…should I?

We now return to our regularly scheduled programming

New site theme up, and a few fixes to the CSS so that IE6/7 wouldn’t render fonts so small.

It’s a bit easier now that I can run Explorer without having to reboot. Turns out it doesn’t do so well at rendering em units for text. I also added a smarmy link to prove that the CSS on this site validates, and that the fault lies squarely with Explorer.

Now, if anyone can explain how to remove the extra scrollbar that IE adds on the right, let me know.

It could happen here

I understand Lindsey Lohan’s a big deal these days. She got arrested for getting blotto in public again.

Of course, I really don’t know exactly who that is, so let’s skip to something more substantial, eh?

Like Estonia. For the geographically-challenged, it’s a small country south of Finland that was forcibly integrated into the Soviet Union, then liberated in 1991. They’re generally unassuming on the world scene, though the Estonians I’ve met are a nice bunch. Over the last month, their government computer networks have been subjected to a targeted DDoS attack.

Boxing the wind.

00110000 00111001 00100000 01000110 00111001 00100000 00110001 00110001 00100000 00110000 00110010 00100000 00111001 01000100 00100000 00110111 00110100 00100000 01000101 00110011 00100000 00110101 01000010 00100000 01000100 00111000 00100000 00110100 00110001 00100000 00110101 00110110 00100000 01000011 00110101 00100000 00110110 00110011 00100000 00110101 00110110 00100000 00111000 00111000 00100000 01000011 00110000

It’s been said that there are six kinds of people in this world: those who can read binary, and those who can’t.

Ubuntu: making things easier

I’ve had my eye on the Beryl project for some time now. Problem is, I’m a loyal Slackware user, and it’s a royal pain in the rear getting it to work on the platform. Beryl isn’t the only problem child, either. I’ve never been able to get Gcdmaster working, and the less said about DVD authoring, the better.

Not that I have any illusions; Slackware isn’t designed to be easy, per se. Rather, it’s meant to be robust, stable and above all, fast. In those respects, it soars. It’s about the only distro I’d use to run a server, and if I need to run something that eats serious CPU cycles, it’s the way to go. It’s the closest distribution to actual Unix, and for an old-school geek like me, it fits like a glove.

The downside is that it takes alot of hacking and hand-editing to get certain things to work.

Continued...

“Text” is not a verb

gud god, ppl. Isnt it jst EZer & faster 2 pik ^ d fone & caL ME, rather thN typing aL DIS n, & getin it wrng? It’s certanlE EZer 4 d prsn on d rec’vN nd. DIS iz harder thN deciphering Morse code n Yiddish, & 2ice az anoyN.

DIS iz jst mo proof dat d avg prsn shud not b allowD 2 hav contak w modern teknoloG.

From now on, I’m telling people my phone can’t get text messages.

Here’s a translation tool for the gibberish above, if you need it (and I do).

This is the annoying “netspeak” of the late ’90’s writ large in the public consciousness. It was boorish and inconvenient back then, and it hasn’t gained any charm in the time since. Can someone tell me exactly how typing/reading something written like that is any more convenient or efficient than standard English?

Paging Marek…

Several years ago, I corresponded with Marek Fetlinski, who ported a few of my WindowMaker themes to Blackbox.

I recently received word from John at Damn Small Linux that he’d like to use one in his distribution, but I’ve been unable to reach Marek for approval. His site also appears to have atrophied.

Since no license was specified or implied, I’ve gone ahead and given the greenlight. DSL will be using the Envane theme. I doubt Marek will mind, since he made the themes for recreation, but I’d like him to know that his work is getting such wide exposure.

If anyone knows how to reach him, please let me know.

IE7: CSS still broken

I’ve got a WinXP partition on my laptop that I have to keep to use SonicStage. Oh, how I hate SonicStage, and Sony for forcing me to use it…but that’s a different topic.

Anyhow, I’ve hued and cried about Internet Explorer’s shoddy rendering of CSS before. Now that version 7 is out, I figured I’d give it a run and see if the codemonkeys at Microsoft had gotten things right. I mean, it’s only been ten years since the CSS standards have been introduced, right? You’d think they could have gotten it fixed by now.

Guess again.

56k: still a consideration?

On most forums, folks are courteous enough to post warnings on threads that are image-heavy and therefore very resource-consuming to people on 56k and slower connections.The only problem is, if you look at what the Web has become, it seems like a pretty unnerving and plodding ordeal for people on dial-up. I’m running on a spritely cable connection, and some of the stuff out there takes awhile to load up for me, so I can’t imagine how heinous it must be for someone on a modem.

Gtk themes

I won’t throw stones in the Gnome/KDE debate. KDE is obviously on a more robust development track, but I’ve always preferred the GTK approach for its speed and clean layout. It’s a drag that Patrick is no longer supporting it in Slackware, but Dropline is an excellent way to manage it.

Of course, the one thing Gnome lacks is the ability to change color-scheme on the fly. KDE, WindowMaker and even Blackbox have utilities for this, but not Gnome. You have to rely on individual static themes for that, and let’s face it, most of them are garish and poorly designed for everyday use.

One of the interesting forks of the GTK toolkit has been Xfce. Olivier Fourdan’s default theme has a nice, clean interface that strongly resembles the “Plastic” KDE theme (it works under Gnome. You can get the engine here.). The config file is well-written and easily hackable, and it’s what I use 98% of the time, so I’ve taken to writing variations to it.

Continued...

This page best viewed with anything but IE

I don’t use Microsoft products. No. Really. The last time I used Windows to any degree was around mid-to-late 2000, and after that, not at all. Since then, Linux has met all my needs, and with alot less hassle.

As a result, I have no idea what’s going on with Microsoft’s development cycle, and I really don’t care to. The last time I even booted into Windows was when I got my laptop a few months ago, and that was just to make sure everything was up and running before repartioning and erasing it.

Somehow Windows XP was even more heinous, resource-intensive and just plain awful from a UI standpoint than its ancestors. I couldn’t do anything without six unrelated dialog boxes popping up (“I know my wireless adapter’s connected! You’re trying to download “updates” right now!”), and it was just plain ugly, and from what I could tell, the user-interface is completely uncustomizable.

Continued...

Back in the Saddle

Okay, the site’s working again. I’m using WordPress to manage content, and it’s taken awhile to convert everything. The layout is more robust, and I’ve got everything categorized. And yes, there’s now comment capability, so vent away.

The site theme is October Language, for which I used Chad Coleman’s Stucco theme as a rough template. Unlike most other WordPress themes, I’ve chosen to give it a wider layout, and it’s scalable. It’s licensed under the GPL, so feel free to use or alter as you like; just make sure the credits in the .css file stay intact.

I was using Blogger for the previous layout. There. I’ve admitted it. Stop laughing. It’s nothing to be ashamed of. I was lazy. It was easier at the time, and it supported standard CSS. For the last few years, I’d been hosting everything of a 200MB drive, and since space was at a premium, it was better to use off-site software.

Continued...

Yes, I know it looks like crap…

I’m currently switching everything over to WordPress, and as I do, some of the older (non-journaled) stuff is on hiatus during the transmission. I’ve cut/pasted a few things over, like the theme-pages, and you’ve no doubt noticed that they need some work.

This leaves you with several options, as I see it:

  • Stop your cryin’, your momma’s not here to take care of you,
  • Cry all you want, but don’t make me listen, OR,
  • Download and clean ’em up yourself. I might even give you credit.

Also, notice that some pages have changed name (and therefore links), so PLEASE search if you don’t find something before you write me an email that reads, “D00d! I can’t fins teh Mall niNja p4ge!!! Is it hax0red?!?”

Things like that just make me smarmy. Then mad. Then tired. Then I can’t get anything done. Bear in mind, the old content should still be up under the original structure, so direct links should work.

Continued...

“Oh my God, it’s on fire! We’re all gonna…”

We’ll be having some minor, some not-so-minor and some downright scary technical difficulties over the next couple of days. I’m transferring the site to a new server, so some stuff may not work. Just check back.

Oh, quit bitching. Like you even pay for anything on the internet anymore…

Linux Myth #483: It’s no good for games

Wine’s been around for awhile, but when I first tried it a couple of years back, I couldn’t get it to work, so I abandoned it as an idea whose reach exceeded its grasp. Wine isn’t an MS Windows emulator so much as a Linux program that imitates Windows’ system-calls and attempts to run them natively in Linux. The idea was that eventually, it’d be possible to use those pesky Windows-only apps without having to reboot into a Windows partition.

When I tried it, it was a pain to install and a nightmare to configure. In the end, it just didn’t work. I hadn’t given it much thought since, until I heard from a friend who was using a Wine-based program called Cedega. He had World of Warcraft as well as several other Windows programs running seamlessly on a Suse box, so I figured I’d give it a try.

The folks at TransGaming distribute a program called Cedega, as well as a graphical frontend called Point2Play that handles everything from the installation to the actual program functions.

Continued...

Election-day Propaganda

Well, it’s election time here in the States. In case you didn’t notice, it’s a ridiculously close race. I’m a dyed-in-the-wool Libertarian, but for the first time in my adult life, I’m voting Republican. Just to be safe.

My finger hovered over the “Badnarik” button until it shook, but I took the plunge and made the moral compromise in the name of pragmatism. I still feel a bit odd about it, but hey, them’s the breaks, and the thought of John Kerry running this country gives me the night sweats. I suppose I can’t always be the fashionable outsider.

Hopefully, I’ll get to keep my guns for another four years.

On a lighter note, here’s another theme from the archives, dusted off and polished a bit. It’s based on a Propaganda background of the same name.

Magic Milk Dispenser

Sleep

Another reworked artifact. This one was a loose port of Lindsay T’s “Sleep” theme for Enlightenment. The wonderful background is from Tommy Tubbiolo.

: Sleep