Category Archives: Computers and Internet

Posts on computer science and the web, rants about OS:es, Window Managers, Platforms for almost publishing content on the web, and the like.

Backing up Concerned Files

Wolfram-Idea-Management-SystemI work with installing and configuring software products. The following “documentation” on backup procedures for an imaginary software system called “Wolfram Idea Management” came to me in the half asleep/half awake stage just after waking up, but kind of before realizing it has happened.

And, no, I hope this has never happened for real! If there is a Wolfram Idea Management system out there, any likeness to that system is coincidental even if per chance the following document could have been ripped out of that software package’s manual pages – then any likenesses are still just coincidental. I’m just that good! (No I do not work with a system called Wolfram… Although the phrase “backing up concerned files” do come from work…)


Wolfram Idea
Management® Software

Backing up concerned files


Important! Important! Important! Important! Important! Important! Important!

ONLY RUN THE PREPACKED BACKUP COMMAND IN WOLFRAM® WHEN BACKING UP FILES!

The command is named “calli-fuckyou-fornia-dream.exe

For the long explanation read the below text.

Important! Important! Important! Important! Important! Important! Important!

Please! Please! Please! Read the whole document before you backup the system!

IT IS IMPERATIVE THAT YOU DO READ THE WHOLE DOCUMENT BEFORE YOU BACKUP THE SYSTEM!

Continue reading Backing up Concerned Files

WordPress RSS Feeds: Create Your Own Links

I decided, after some “experiences” to add a blog post about adding a link to the WordPress RSS feed of your site.

I may be missing something, or may not have come across the right plug-in or something else, however, I was unable to add RSS to my site. Either I got my feeds full with garbage and (I think) advertising from the plug-in author, or the simple little itsy-bitsy tiny RSS feed plug-in managed to make all my “Edit” buttons and links unreachable in edit mode (like when you wish to change the Publish date or the post slug).

Now there is a built in WordPress RSS feed widget, however it imports some one else’s RSS feeds while I want to have a link on my page that exports my RSS feeds. And, no, using the built in plug-in on your own site does not seem to make anything else than a list of links to your posts.

Either someone forgot to explain RSS feeds to the WordPress coders or, as I said before, I may not understand it.

Anyhow, I finally did it myself instead.

This is how I did it:

  1. Add a Text Widget to your theme’s widget area
  2. Put some HTML into the Widget
  3. Check out WordPress’s RSS Codex page

1. Add a Text Widget to your theme’s widget area

Adding a WordPress RSS Feed using a Text Widget
Adding a WordPress Text Widget (click on the image to get a full size version)

You do this via “Appearance > Widgets” from the admin menu in WordPress.

The exact name of the widget is simply “Text”. It comes built-in with WordPress.

I used the text “RSS Feeds” as Title.

2. Put some HTML in the Widget

Here are two variants, one for the twenty eleven theme and one for the twenty twelve. The only difference is that the twenty eleven looks better as a list. This text goes into the larger text field of the widget.

Twenty eleven:

<ul>
<li><a href="http://YOURSITENAME/feed/"
  target="_blank">Posts</a></li>
<li><a href="http://YOURSITENAME/comments/feed/"
  target="_blank">Comments</a></li>
</ul>

Twenty twelve:

<a href="http://YOURSITENAME/feed/" target="_blank">Posts</a>
<br/>
<a href="http://YOURSITENAME/comments/feed/"
  target="_blank">Comments</a>

Replace YOURSITENAME with the name of your site (e.g. http://www.example.com).

The ”target=”_blank”” section of the “a href”-link ensures that the link is opened in a new window.

3. Check out the WordPress RSS Feed Codex page

http://codex.wordpress.org/WordPress_Feeds

The codex page contains some more links, for instance to posts in categories and tags.

It may also be good to check that page to see that the links used here are still correct.

If you want to try other links simply replace the URL in the href=”URL part of the a-tags above.

 

watch – Linux command

The Linux watch command is a nifty little tool that can be used when you want to keep the result of a command under constant watch.

Here’s a sample for watching the /proc/mdstat file.

watch -n1 cat /proc/mdstat

The “-n1“-switch tells watch to refresh every “1” second (“-n2” would consequently mean, “refresh every 2 seconds” and so on).

The “cat /proc/mdstat” is the command to keep an eye on. “/proc/mdstat” is a process file that displays the state of md-raid drives in the system.

Press ctrl-C” to stop the running command.

This is an example of “watching” the free memory:

watch -n1 free -m

If you add the “-d” switch, watch will mark differences between the runs.

watch -d -n1 free -m

And with the “-d=cumulative” switch the differences will be marked cumulatively between runs:

watch -d=cumulative -n1 free -m

You may also watch for directory changes:

watch -d ls -l

If you do not specify a watch interval (using “-n“) the default is set to 2 seconds.

For more info, see the manual pages for the watch command.

For watching files see the related “tail” command.

 

PEBCAK and other ways to blame the user…

User ErrorIn IT-support jargon the expression “PEBCAK” (meaning “Problem Exists Between Chair and Keyboard”) is used to blame the user of the system for any computer-related problems they are experiencing while using said system – since they are located “between the chair and the keyboard” in most usual situations…

PEBCAK can be found long before the program reaches the end-user

I had a fun thought about the expression PEBCAK. Given my many years in IT development, I have observed two things:

  1. Few programmers write their programs without sitting on a chair in front of a keyboard…
  2. PEBCAK is just as likely to start way before the software reaches the end-user.

Unrecoverable System ErrorIf you think the Project Cartoon is a gross exaggeration (you are probably an ordinary, unsuspecting computer user, and a victim :P…) I have to inform you, it’s not… The sad truth is that programmers have never been in control of systems, and even the most stable and dependable systems have flaws.

Even NASA has PEBCAK

Did you know that up until 2007 the space shuttles never flew missions over the new year… why? Because their computer systems, programmed in the 70ies, had no stable support for year changes…

Searching to find my source on the above statement only produces two Slashdot articles with links to, now non-existing, articles on CNN and Reuters. (Although I just came across this fact a couple of months ago, so either the conspiracy is recent, or my Googling skills are decreasing…) Anyway, here’s the Slashdot links:

I’m not going to search for pacemaker system errors or similar, but I can guess the mitigating circumstances are that you’re not in space when the problem occurs and might actually get into the hospital in time…

If you like to read more about programmer initiated system errors (and errors initiated by IT projects) you should check out The Daily WTF.

ISO 8601, or not…

They always have great alt texts as well: ISO 8601 was published on 06/05/88 and most recently amended on 12/01/04.
XKCD – nerd humor at its best!

I think Sweden adopted ISO 8601 sometime around when it came. Before that we would write dates as day/month-year (that would be discouraged format number 11 on the image to  the right).

Then came along Internet Information Server (IIS) invented by an American firm you might now, called Microsoft. In the US where Microsoft lives, dates are written using discouraged format number 1, or perhaps 2, unless it’s 3 or 4, I never manage to keep track.

Most of the time it’s possible to just ignore the highly illogical way of mixing up days and months and years in the US way of writing things. ISO 8601 goes from larger to smaller, the old Swedish way went from smaller to larger, the US way goes from uh… large to smallest, to largest…

However, a project I was involved in a couple of months ago used some form of standard date widget in IIS (Internet Information Server, Microsoft’s Web Server) that used discouraged format number 1 above.

Now for the fun part. In my humble and naïve mind this should be a question of just setting a language setting somewhere in the web server to get it right. Apparently it wasn’t (!?) Instead everyone was running with the totally confusing US-dates. The budget did not have room for making the change, and it seemed everyone humbly adopted… after all, there was a “date browser” that could be opened pressing a button (first time it took a minute to open, but then it was business as usual). I’m guessing they used that function to get their dates, or perhaps I’m just an old fossil that doesn’t adopt well.

So the punchline (unless the previous sentence wasn’t punchline enough for you…): yeah standard until some guy comes along and wants it otherwise, and this guy has all the power… then it’s a (quote-unquote) “standard” and not a standard any more.

 

Ubuntu Satanic Edition

Ubuntu Satanic Edition, with hellfires...
Ubuntu Satanic Edition, By Daniel F. Pigatto

If you feel like your Ubuntu is way to benevolent, you can always go Satanic.

Of course, I thought this was the edition I had installed, given Unity’s behavior, and the fact that my raid-devices are dropping like flies (they passed a badblocks scan, and as far as I can tell they are working again), but alas, perhaps I need more goat blood, hell fires and ritual chants?

The versioning of Ubuntu SE is less time constrained. Instead of using the year and date, like Ubuntu does, the numbering is simple: 666.8, for instance is the version number of “Undead Legion”, followed by 666.9 “Microsoft Massacre”, and 666.10 “Necrophiliac Necromancer”.

On the plus side, I may be able to scare my computer into submission by burning a CD of satanic edition…

OK, seriously. I fear Ubuntu Satanic Edition may be way too old to do anything with… (um although upon closer examination, they seem to have a news item from 27th of uhh January, 2012… that’s a year ago…) but on the other hand… Isn’t the current edition way too satanic? I think I could get a break from all the unholy shit going on if I installed this one with goat heads, flames and blood and everything else that belongs!

Another way to go would be Ubuntu Christian Edition, but unfortunately, I do not think Jesus will be downloading it any time soon…

MS Outlook laughs at your feeble attempts to use it…

scornful-outlookNot only doesn’t it work, it laughs at you while you try using it… or well, it’s being scornful. I’m talking about Microsoft Outlook, that gave me the following comment (underlined red) when I tried to use it today.

So was the information helpful?… uh… I guess compared to faking that it can do the work and then tell me in about a week that sorry, I was just kidding, it is in fact helpful to get to know it cannot be done already on Monday…

Happy Monday!

Unity tip: Open more than one instance of a program

Clicking on a program icon on the Dash.
Clicking on a program icon on the Dash.

In Ubuntu 12.04 LTS, using Unity, if you have opened an instance of a program, clicking the application icon for that program again will only select the most recently displayed window of that program.

Clicking again displays all windows of that program in a scaled down version (á la OSX 2000 or similar).

However, in order to open a second instance of a program you have to mouse-wheel-click on the icon (I’m only guessing, but middle-button-mouse-click might also work, left-right-mouse-button click does not…)

Another way to do it is holding down the Window-key and Shift while pressing the number for the application you want to open another instance of. Holding down the Window-button alone shows the numbers (but the applications on the bar are numbered starting with 1, but excluding the “Dash home”).

Google translate is safe…

It seems Google Translate has little to fear from the competition. The site HowtoSayin.com poses the following question on one page:

How to say “hon wisperd säger ord i mitt öra att förbaskat nära made my toes curl” in…

The short answer: you certainly do not… at least not in Swedish, or English, who both seems to be parents of the above monster child of a sentence…

A full “translation” to English would be something along:

How to say “she whispered says word in my ear that damn near made my toes curl” in…

So, yes… Google Translate is still pretty safe in the translation business…

Backwards Firefox Update… Bad Firefox!

I just upgraded my Firefox and afterwards Firefox update as usual checked what plug-ins would be compatible or not…

Today Tab Mix Plus wasn’t compatible and Shazam! All my tabs are lost (or at least they are gone for now, I can only assume lost to never be found again…) Not that I really had my bookmarks collection there or anything like that, but still… the tabs represented “unfinished issues”.

So I just had this thought: why does Firefox upgrade first and then checks if the plug-ins will fail or not? Shouldn’t it be the other way around? Firefox update should first check what plug-ins won’t be compatible then ask the user if they want to hold back the upgrade, and if not, then make the upgrade?

This way I could have held back my upgrade until Tab Mix was compatible (which I am pretty sure will happen in hours or days…)

Update: I found a description on superuser.com that details how to perform the plug-in check before running Firefox update… so this becomes a “Bad Ubuntu” post instead… why doesn’t the Ubuntu upgrade perform this check before just forcing Firefox on me? Ah, well…

As it turns out, the option to check for updates as the post (from 2009) states isn’t even available in my Ubuntu installed Firefox. Unclear if it’s available in Firefoxes not controlled by an Ubuntu install (I’ll have to check on my work machine to determine that…) Or perhaps it’s that I have version 17 of Firefox… maybe the option only appears when there’s an update to have? – my Firefox is just updated, but still… my Ubuntu will probably not like it if I start upgrading Firefox on the side.

Update 2: Nope, once Tab Mix Plus was back in the game again, I did regain all my old tabs… and lost the new ones (ugh). Ah well… *shrug* And I didn’t seem to find any way to make blockhead-Ubuntu-update ask before shooting on this one either… At least the tabs are just “on vacation” for a while whenever this happens…