Archive for July, 2012

Firefox’s dictionary doesn’t include the word “phasers”

Tuesday, July 31st, 2012
Firefox marked "phasers" as misspelled.

What kind of nerd lets their product ship with such a glaring omission?

Work attire

Tuesday, July 24th, 2012
In an e-mail, a co-worker indicates that we will soon have clients visiting the office. I reply that I will wear my Star Fleet uniform and set phasers to stun.

I don't remember if I actually sent this or not.

I love WordPress I hate WordPress

Saturday, July 21st, 2012

“WordPress” can refer to one of two things: free software you can install on your server to run a blog (available from wordpress.org), or a web site where you can sign up for a blog (wordpress.com). Obviously, the former powers the latter. This web site is powered by the free software package. I love the free software package.

I hate wordpress.com. Every interaction I’ve had with it has been bad. I signed up for an account to tinker with hosted blogs. After that, when I tried to post a comment on a blog hosted on wordpress.com, it prompts me to log in. I don’t want to have to log in. I just want to leave a damned comment. You can’t ever delete a WordPress account.

They tell you that if you don’t want to be prompted to log in, change the e-mail address on your wordpress.com profile. I went to my favorite disposable e-mail address site, got an e-mail address with a shelf-life of 60 minutes, and changed my WordPress e-mail address. Satisfied my wordpress.com account was now as close to deleted as it would ever be, I went on with my life.

Tonight I went to comment on a blog which, unfortunately for all involved, was hosted on wordpress.com. You’ve probably guessed by now it prompted me to log in. I tried my garbage password. It didn’t work. I wouldn’t have bothered to think up a real password, so I have no idea why it’s claiming my garbage password is no good. I immediately clicked “Forgot my password”. I submitted my e-mail address. You can imagine my rage when I saw the following screen:

Error: There is no user registered with that email address.

If you were tangible, I'd cut you.

If you have no one with that e-mail address, why the fuck can’t I comment with that e-mail address without being prompted to log in?

So, not only can I not DELETE the wordpress.com account, I can’t get in. At this point, I wish I could nuke the damned thing from orbit.

Don’t even get me started on Gravatar. I hate them with a fire normally reserved for bad drivers.

Link ALL the things!

Thursday, July 19th, 2012

This is a way ancient link dump.

Smosh: Best Of The ‘X All The Things’ Meme! – This meme is based on this classic post from Hyperbole and a Half. If you haven’t read it your life is incomplete. Anything related to Hyperbole and a Half is necessarily awesome. This post is updated occasionally. Sadly, they removed the link to the Hunger Games version – I suspect they got a strongly-worded letter from the movie studio because the only one I could find on the internet is tiny.

RUIN ALL THE STAR WARS!

Fark: Bad: Getting busted. Worse: Performing community service. Fark: Getting more time added onto your sentence for affixing a sex toy to the County van (Comments) – I’m going to go ahead and disagree with the police who called it “physically offensive” and declare it awesome.

Slashdot: EFF Launching ‘Patent Fail’ Campaign

Slashdot: Why Open APIs Fall Far Short of Open Source – I often hear having access to a site’s API being compared positively to having the source code and/or owning your own data. It is not, and I’m glad some smartypants is saying it more loudly than I can.

shit-thatblows: [no title] – This site is awesome, not that anyone needs to spend more time dwelling on shit that blows. This one also made me giggle.

Margaux Lange: Rings – This artist makes fascinating jewelery out of old Barbie dolls. As far as I can ascertain, she’s not selling them from her web site, which gives me a little bit of a sad. This might be way old news, but it’s the first I’ve seen of it.

Wikipedia: Voltaire’s last words are definitely old news, but still funny: According to one story, when he was on his death bed, the priest asked him to renounce the devil, and he replied, “Now, now, my good man, this is not the time for making enemies.”

Smosh: 25 MORE Super Cool Bras!

Ars Technica: Preorders begin for Spark, the open KDE tablet – No credit card necessary, they’re just trying to get a feel for how much interest exists. I hope they realize how rough a figure that is.

Slashdot: Booktype: An Open Source, Cross-Platform Approach To E-Book Publishing – one thing I love about the free software/open source community/communities is that whenever there’s a fluster of cool stuff in the closed software world, free-as-in-liberty versions start appearing. Free-as-in-liberty software also comes first sometimes, but I emphasize the opposite because sometimes new free software/Linux users think that giving up proprietary software means going without. It might entail some waiting, but if you really want it, code it yourself.

Fark: The FCC is about to make robocalling a lot harder (Comments) – I thought this story was going to be about tougher sentences for those who break the laws, but:

He expects the commission to approve new rules that will require telemarketers to get written consent before making such calls.

Three cheers for everybody even tangentially involved with this! Now if only I could find a way to get vengeance on all the telemarketers who illegally call my cell phone.

Fark: Six terrifying user agreements you’ve accepted. WE OWN YOUR SOUL (Comments) – <free-software-snob>Most of these can be avoided by using software that respects your freedoms instead of handing your data over to others.</free-software-snob>

Fark: Tokyo rabbit cafe smash hit with stressed-out Japanese. “‘I came here during my break to relax,’ said a smiling woman in her late 20s as she fed fresh vegetables to some of the rabbits” (Comments) – Petting bunnies sounds like an awesome way to spend a lunch hour, especially on a stressful day. I wonder if animal shelters could set up similar places to generate revenue, find potential adopters and keep the animals well-socialized. My only concern would be that letting just anybody pet the animals would result in harm to the animals.

…love Maegan: Old Hollywood Glamour ~ Lace Halter Bustier DIY – I’m a sucker for DIY projects like this that make an ordinary thing awesome with very little effort.

Man Boobz: Are dog bitches superior to human bitches? A misogynist dingbat says yes. – A nutty misogynist gives a long list of unpleasant activities a romanitic partner might do that his dog doesn’t. Man Boobz proprietor David Futrelle writes,

I don’t know from dogs, but if my cat were actually capable of any of these things, she would do them. That’s part of the charm of cats. They’re tiny little monsters — selfish, self-absorbed, amoral creatures we let into our homes because they’re cute, they’re fascinating, and they’re too small to kill us. Not that mine doesn’t try.

An Unfortunate Caption

Tuesday, July 17th, 2012

The juxtaposition of this image and caption cracked me up:
Get technology updates now

Improved Apache Log Ownership

Sunday, July 15th, 2012

On my server, I have two active users, root and kj. I am the man behind both those curtains. I have a couple friends or clients with accounts, but they’re not as active. For many years, I used Apache’s default log location, /var/log/apache/[hostname]-[access or error]_log. Those logs are owned by root, so if I want to see my logs, I have to log in as root. Sites are in ~/vhosts/[site]. The publicly accessible files are in ~/vhosts/[site]/htdocs. ~/vhosts/[site]/ is a better location for logs than /var/log because it spares me the trouble of traipsing about the filesystem. Unfortunately, I still need to `su` since the files are owned by root.

I recently started using logrotate, I noticed one of the settings is a create command that allows you to set the mode and file ownership. Unfortunately, all the logs must have the same permissions, so I can’t just make everything owned by kj without making my other users sad.

The solution I propose is a cronjob. The logs rotate at midnight, and at 12:01 change the ownership of the logs to whatever user’s home directory they’re in:


#!/bin/bash
 
# For every user's home directory. find the
# virtual hosts. Assumes the following:
# --all users have their public-facing website(s)
#    in ~/vhosts
# --each directoy in ~/vhosts represents a
#    separate web site
# --logs are written to ~/vhosts/[site]/logs
# --ignore root's home
 
cd /home
 
for home in *; do
    # If any such logs exist, change the
    # permissions. Ignore warnings about
    # file non-existence
    let num_file=`ls /home/$home/vhosts/*/logs/ \
         2>/dev/null|wc -l`
 
    if [ $num_file -ne 0 ]; then
        chown $home:users -R \
            /home/$home/vhosts/*/logs/*
    fi
done

If you’re looking to set up something similar for users who can’t fall back on `su` while they’re developing, set it to run more often.

Possible improvements:

  • If you were really smart, you could probably use `find` or similar to find all the logs owned by root, and chown only those. I suspect that the time it takes to `find` the files is greater than changing ownership of all of them, but that may change with a sufficiently large number of logs. If suspect you have such a quantity, it might be worth clocking both variants of the script, since it may need to run quite frequently.
  • Rather than looping through all the directories in home, use awk or something to set the value of $home.
  • Better yet, check which user owns the containing directory, and set that user to own the logs.