“I have got distributed your internet-site during my internet sites”

May 13th, 2013

Below are (excerpts of) real spam comments posted on this very blog that made me laugh. My apologies to anyone who may have been trying to convey a serious comment; when in doubt, I spam-bin.

First, the one which is excepted in this posts’ title.

That’s extremely attention-grabbing, That you are a good too much skilled tumblr. I have registered ones give food to and search in front to be able to seeking more of the outstanding write-up. Moreover, I have got distributed your internet-site during my internet sites

nevertheless, you command get got an edginess over that you want be handing over the following. ill for sure come more in the past again since precisely the same just about a lot continuously inside of case you defend this increase.

I look forward to seeing you in the past again!

…You’re an exceedingly knowledgeable doodlekit. I have got registered your own feast and search in advance in order to searching for further of this exceptional posting. Additionally, I’ve got embraced your website in my myspace

People stopped using MySpace like seven years ago. You must be so lonely, being its last user. Tom, is that you?

…I will be bound to book mark them accessible to know more of one’s handy data.

That’s just what my mother always says, “Mark them accessible to know more of one’s handy data.”

Precious information. Blessed me I discovered your web site by chance, for stunned the reason this kind of accident failed to occurred prior!

For the first sentence and a half, this comment had me going. People prefix sentences with “Blessed me” in the south right? Could Scarlet O’Hara – who historians have long assumed died during her circumnavigational flight of the globe in 1937 after World War II’s famous supercomputer Skynet became self-aware and declared war on all humans – have posted this very comment?

Alias `su 0` to `su -`

April 22nd, 2013

You can only alias a command, not a command + argument(s). The process of automatically fixing oft’ mistyped arguments involves 2 steps:
1. Alias the command to a shell script
2. Write shell script to replace the erroneous argument with the real one.

For step one, create the following alias:
alias su="~/bin/su_improved.sh $@"

Although I found many sources claiming you can’t redirect all a commands arguments to another command, $@ does exactly that. I mention this in case my system happens to be the exception rather than the rule.

The script, ~/bin/su_improved.sh:

#!/bin/bash
# Alias 'su 0' to 'su -'
 
# Created by KJ Coop on Sun Apr 21 23:24:28 PDT 2013
# Yoinked from http://kjcoop.org/2013/04/22/alias-su-0-to-su/
 
if [ "$1" == "0" ]; then
    # I can't `su - @#` because it expands into `su - 0...` so I'm just
    # assuming there's a max of 2 arguments: su [dash] [username]
    su - "$2"
else
    su $@
fi
 
exit 0;

Eliminating Suse splash screen forever

March 2nd, 2013

This trips me up every time I set up a new system. I go into the process remembering that I get tripped up somewhere, but retaining no details about what I should do differently. I am posting this in the hopes that next time I’ll remember to look it up here.

The first step – the one I tend to remember – is to alter menu.lst: for each entry, change splash=silent to splash=verbose and remove the word quiet.

That will remove the splash screen from all the existing boot options, but when an update inevitably adds a new kernel, it will get the default options, including the splash screen. Thus the second step – make a similar change to the default options stored in /etc/sysconfig/bootloader. The line describing the default options starts with DEFAULT_APPEND; remove the word quiet and change splash=silent to splash=verbose.

I had this experience yesterday

February 16th, 2013

Fry: Not sure if weird feeling is stress or absence of stress

Incidentally, this is narrower than most instances of this meme because of this bug, which most definitely caused me to feel stress, pin this image.

Shrink Twitter widget’s min-width from 220 to 190

February 1st, 2013

Today I added a Twitter timeline to this blog’s sidebar, and I noticed it was expanding a little bit beyond the borders of the box. Twitter’s guide indicates the timeline will automatically shrink to the size of the parent, but that was not happening, I’m guessing either due to margins/padding or a hard-coded minimum. Twitter’s suggestion of adding width=”190″ to the containing element failed, but I was able to override it’s min-width property by adding the following to my stylesheet:

#twitter-widget-0 {
    min-width: 190px !important;
}

You might want to use Firebug to double-check the ID. If you have multiple timelines, each will have its own ID; I suspect there’s a class or something you can use to resize them all in one fell swoop.

Although I would have liked to the min-width to a smaller value, the box stopped shrinking at 190 pixels.

In my brief internet search, but I didn’t see this suggested elsewhere. Hopefully this will save somebody a little trouble.

DIM Planner: The System So Far

November 30th, 2012

I love productivity porn: seeing how things are organized, reading about better systems to attempt to deal with the unending influx of things to do. I love finding new ways to bring order to disorder – that’s my favorite part of programming.

For most of my adult life, I’ve been going back and forth between using paper or computer systems. Right now the pendulum is tilting heavily toward paper. It’s an unholy amalgamation of my vague recollections of GTD, DIY Planner templates, and the calendar on my phone.

Principles

As I indicated above, some of these come from GTD, some of them are rules I made up, some are probably ripped off from other productivity books. Many of these principles are surely one or more of the above.

  • The system must not require me to write anything down more than once. A lot of planners come with monthly and weekly pages, but I cannot be trusted to consistently write the same piece of information down twice.
  • Similarly, I just can’t get in the habit of looking in two places for one set of information – in the example above, checking two calendars won’t happen: I’ll check on and forget the stuff on the other one.
  • I don’t have an office, so it’s imperative the system remain a size that is practical to cart around with me.
  • The system must let me get the odds and ends out of my head and into paper. I have an awful memory – anything that exists solely in my head will not exist for long.
  • I’m easily distracted. At any given moment, there are at least a dozen things I’d like to be doing. There are almost always dozens more floating around in the recesses of my brain. The rate at which I come up with cool stuff to do vastly exceeds the rate at which I can do them. This system is an attempt to cope with that.

Physical components

The backbone of my system is a one-inch binder with roughly 5 sections. I say “roughly” because I’m so cheap that I didn’t want to buy more than one set of tabbed dividers, so the tabs represent general groupings. You can download the templates I use as PDFs or Open Office Draw files.

  1. Brain dump – This section consists of the sheet titled “Prioritizing table”. It comes before the first tab. I want to be able to open the binder, dump the contents of my brain, and go back to whatever I was doing with minimal distraction.
  2. Daily Diary – I use this to both record information about the day that passed, and layout a plan for the day ahead. As a freelancer, I often experienced the blessing/curse of having an unstructured day, and I like to have a record of both what I intended to do, and what I actually did, so that way I can see how productive I was, or if things took me longer than expected. There is one page per day, double-sided. I usually don’t print more than a couple days in advance. If I have something to remember that is farther in the future, I rely on the calendar on my phone.
  3. Projects – each project has its own page and they’re alphabetical by title. At the beginning of this section, there’s a list of projects and their next steps. I review my projects every Monday and write a new list for the upcoming week. Last week’s list – and any projects finished that week – get stapled up with that week’s daily diary sheets.

    In Getting Things Done, David Allen describes a project as anything with two or more steps, but I find that definition to be a little unwieldy – I don’t want to make a new project page for every load of laundry. My guideline is anything I’m not likely to finish in one sitting.

    This section is both the most used and most heavily under construction – a lot of projects are sub-projects of others, and paper just doesn’t deal with that well (at least not in a system that needs to be portable). I’m trying to live with the fact that the project pages are necessarily rough and imperfect, but I’m finding that surprisingly difficult to accept.

    There are a few different pages for different types of projects

    • General project – mostly just a checklist
    • Reading project – I usually keep notes as I read a book, and I often plan to review it on the internet when I’m done. This sheet first serves as a home for my notes as I read the book, then as a guide while I write the review.
    • Web project – includes all the steps that will be in every web project I do, whether it’s for a client or my own amusement.
  4. Reference – This is mostly just a collection of lists – tools that are useful for new clients, skills I want to improve, random business ideas. There are also some really specific pages in here:

    • Financial – as mentioned above, I freelance, which means that when tax time rolls around, nobody mails me a handy W2 summarizing what I made in the previous year. Every time I get paid, I enter it here. In the future I may expand this to include a detailed accounting of business expenses I planned to deduct, but right now, I don’t have enough deductions to make it worth my while.
    • Password lists – I have like 3 pages of passwords just for my own person, and another few pages for clients. There is just no other way to keep all that information in my head (see above – things that exist only in my head will not exist for long).
  5. Maybe/Someday – David Allen calls this a “tickler” file. Some pages are just lined paper of hare-brained ideas to consider when I have time (HA HA!). There are also some project pages in here – a lot of times, in my excitement, I make a project page and dump my brain out, only to realize a few days or weeks later that it’s not going to top my list of priorities any time soon, at which time it gets moved to the Maybe/Someday tab. I’ve always got about 30 things going on in my brain at once, and if I keep low priority projects in the projects tab, that means I’m routinely flipping past them, seeing them and getting distracted by them. This is a fairly new practice, so as of yet, nothing has moved from the Maybe/Someday tab back into the Projects tab. I’m open to the possibility that this section will become a place where projects go to die.
  6. Extra paper – Pretty self-explanatory. Some are template pages described above, others are blank. I try to keep at least one blank of any given template so that way I can copy it, rather than having to print from the computer (My printers has limited support for Linux).

Behavior

On Sunday, I print a new “Project List” and “Weekly” pages. I culled a lot from the “Weekly” page that you downloaded because this will vary so much from person to person, but I tried to keep enough stuff there to give you an idea of what stuff you should add.

My first order of business Monday morning is to SKIM my e-mail and make sure there are no production servers in distress. Provided I don’t have any fires to put out – and I usually don’t – my second order of business is to fill out the Project List. This consists of flipping through the Projects section and ascertaining the next action for that project. If I don’t think to get to it in the next 7 days, I move it to the Maybe/Someday section. If I do plan to get to it, I write it on the list. Then, I go through the Maybe/Someday section and see if there’s anything on the back burner that needs work in the upcoming week. If so, it gets written down and moved up to Projects. I try to limit my Project List to one page, so that way I can double-side it with the “Weekly” page.

When that’s complete, I staple together previous week’s Project List, Weekly and Daily Diary pages and put them in storage with the other stuff I keep for sentimental purposes. As I typed that, I realized it sounds like kind of an odd pairing, but it works (see above about stuff that only exists in my head – I’ve already forgotten the exact phrasing I used when I wrote that section 20 minutes ago.)

Once or twice a day, I go through the brain dump section and copy the items to project pages or whatever. Not everything needs to be a project – for example, if I want to call a friend on their birthday or text them a funny story. You may think, “Who writes that on their to-do list?” See whatever I wrote up there about my brains being unreliable.

If I have an especially hectic day or week ahead of me, I’ll use a Prioritizing Table to try and prioritize all my activities (thus, the name).

It’s very much a work in progress. Since I first drafted this post 3 weeks ago, I’ve started rereading GTD and revising this system. I may post updates to this system. I know I totally love geeking out on other people’s systems, so I hope I can provide others with the same thrill.

Megameme

November 13th, 2012

My favorite new meme is “Go home [thing], you are drunk”. I’ve seen it three times in the past couple days, but I only remember two: this one and this one.

I was recently lying in bed trying to go to sleep when I suddenly had an urge for fried food. Instead of going to sleep or eating fried food, I pictured an internet meme:
Ahh, time to slee- HEY LET'S GO EAT!

Naturally, the next step was to try to work “Go home brain, you are drunk” into it somehow.
GO HOME BRAIN, you are drunk.

When I realized I had used 3 memes in one, this was the logical next step:
FOUR MEMES IN ONE IMAGE I AM AN INTERNET GOD

As an aside, today I’m celebrating 13 years vegan. Hoorah!

Silly on the internet

November 4th, 2012

I was curious about the benefits of ABP vs Ghostery (Firefox plugins that hide ads and/or tracking), and my research lead me to some rather silly places:

Ghostery CRACKED ME UP with their Halloween contest winner. I took a screenshot in case they ever remove the post I LOVE IT THAT MUCH:
Sparkly vampire!

On this thread, one commentator wrote, “No, i don’t give a **** about tracking cookies”. A follow up pleased me almost as much as Ghostery’s Halloween trick/treat:

“I admit I don’t give several asterisks about tracking cookies either, but I am curious about how I can still get them though.”

I don’t know why, but it really grates at me when people substitute asterisks in place of swear words. It’s like they’re trying to “clean” their language, but not so much so that they’re will to actually choose a new word. We all know you’re swearing under there – you can type the actual letters, I promise we’ve all seen the word before.

By the way, if you’re not using Ghostery, I recommend it: it’s an easy way to limit ad networks’ ability to track you from site to site. I have yet to experience a downside to using it. Install it here

Text a reminder to the members of your houseshold

October 4th, 2012

Every week we forget trash day, so I’ve been meaning to write a script to remind all of us the night before to put the trash cans out.

I only wanted to type the phone numbers once, so I hard-coded them as variables into the script. Turning the command line argument ‘kj’ into the value of $kj was by far the most difficult because I had to look up how to do indirect references in bash, which, as it turns out, is kind of a pain.

In an effort to spare you that same pain, I’m posting the code here.

Usage

If you call the file text_reminder.sh, the usage is as follows:
text_reminder.sh [path to reminder] [recipient(s)]

[path to reminder]

This script can be used to send you several reminders. It looks for a file at the specified path, then uses the text of that file as the body of the e-mail/text. Be sure to create the reminder file before you run this script. For the purposes of example, let us assume it’s in ~/reminders/reminder.txt. Remember to keep it brief – it will be split into 140-character increments, so if you send an 1,000-character reminder, it’s going to arrive as eight annoying, disjointed texts.

[recipient(s)]

I hard-coded shortcuts into the code so I can use aliases instead of relying on myself to having to type a phone number more than once. You can set up as many recipients you want, but note that the code, as it is pasted below, will fail because there are no real recipients set up. You’ll need to add at least one to get any use out of this code.

Setting up a recipient is fairly simple: most (all?) cell phone companies allow you to text message customers via e-mail with an address following the format [10-digit phone number]@[domain]. Finding the value of [domain] is the most time-consuming part, because each company has a different domain, so you need to ask each potential recipient who their cell phone company is, then dig up the corresponding domain. I used this page as a reference, but it may be out of date by the time you read it. If your phone number is (503)555-1234, and you’re a T-Mobile customer, the address at which my phone receives texts is 5035551234@tmomail.net.

As always, send several tests before using it for real.

Code


kj='number@provider.com' # CHANGE THIS
eric='number@provider.com'
# etc, you can set up as many aliases as you like.
 
if [ "$#" -lt 2 ]; then

    echo Usage $0 [path to reminder] [recipients]
    echo Recipients defined: kj, eric # CHANGE THIS

    exit
else
    reminder=$1
    if [ ! -f $reminder ]; then
        echo The reminder you specified, $reminder, does not exist.
        exit
    fi
 
    let i=2;
    while [ $i -le $# ]; do
        numvar=\$$i
        varname=`eval echo $numvar`
        vartoeval=`eval echo $varname`
        recipient2=\$$vartoeval
        recipient=`eval echo $recipient2`
 
        if [ "$recipient" == "" ]; then
            echo I do not understand the recipient $recipient
        else
            echo mail "$recipient" -s 'Friendly reminder' -r kj@kjcoop.com -a $reminder
            mail "$recipient" -s 'Friendly reminder' -r "kj@kjcoop.com" < $reminder
        fi
    let i=i+1
    done
fi

Cron job

In order to make this run regularly, you’ll need to create a cron job. You can do that by running “crontab -e”. On most systems, this will default to vi, which can be kind of scary to the uninitiated, so here’s a cheat sheet.

I’m going to assume you’re uninitiated: Copy and paste the following into a text editor you feel comfortable with:
0 21 * * 1 ~/bin/text_reminder.sh ~/reminders/reminder.txt kj eric

This will send a text to each recipient listed reminder at 9 PM every Monday night contain. Change the path and recipient(s) to your liking, then copy the whole thing. Switch to the window where you ran “crontab -e” and vi awaits you. Type “i” to enter “insert” mode – this will allow you to use vi like a normal text editor. Paste.

Hit the “esc” key (top left side of your keyboard) to exit “insert” mode. Type “:wq” to save your changes and exit. If you screw up and you don’t want to save your changes, you can exit with “:q!”.

Potential improvements

This was pretty quick and dirty, but a couple glaring improvements stand out:

  • Allow the user to specify a subject. At the very least, make the hard-coded subject a variable so that it remains uniform between the line that sends the mail, and the line below that prints the send command used.
  • I could have put the aliases in some kind of array, which would have allowed for more robust error-checking and prevented the user from having to manually change the usage instructions.
  • Some of the variable names in the while loop are awful.

Tuesday silly: A sports bed

October 2nd, 2012

I noticed this on the foot of a hospital bed. I’d heard of sports cars, but never a sport bed. But from the diagram, it looks like you can luge on it.