Linux

Preserve Code formatting in WordPress

WordPress har en lei tendens til å fjerne formatteringen på alle themes. Løsningen for å vedlikeholde formatteringen er å legge/endre følgende linje i wp-content/themes/themenavn/style.css fila under code { }: code, pre { white-space: pre; } Man må da benytte pre-taggen for å beholde formatteringen.

Read More
Linux

Change desktop images based on CPU load via a script

On a few recent occasions, I have had to catch and fix runaway CPU-hog zombie processes. Usually, I notice these after a being frustrated for a period of time by slow machine response times. Using the w command in a terminal shows that my CPU load is too high, but I often don’t think to […]

Read More
Scripting

Lage kalender fra konsoll

Utskrift av gjeldende måned cal April 2007 Su Mo Tu We Th Fr Sa 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 Utskrift av hele året cal -y

Read More
Scripting

Recover a dead hard drive using dd

The Unix program dd is a disk copying util that you can use at the command line in order to make a disk image. It makes a bit-by-bit copy of the drive it’s copying, caring nothing about filesystem type, files, or anything else. It’s a great way to workaround the need for Norton Ghost. Normally, […]

Read More