Thursday, 30 August 2007

timeout

I've found the perfect app for the hours-on-end-in-front-of-computer users. It's called Time Out and its free. What this program does, is it forces you into a break at a scheduled time by blanking out your screen. You get normal and micro breaks. A normal break defaults every 50 minutes and lasts 10 minutes, a micro break happens every 10 minutes and lasts 15 seconds. You can change the duration at will.

The only thing I didn't like about this app, was the picture that came up during the break... the whole yoga meditating person thing... I think I found that as distasteful as a new-ager would find a message popping up saying "Jesus is the only way to God". So, learning from another tip on how to change program pictures, i tried to see if I could change the image, and I did.

This is what the original image looked like:


Here's how you change it. You select the TimeOut.app file in Applications (obviously after you've installed the program). Right click and go "Show Package Contents". Go into the Contents and then Resources folder. You'll see the icon as TimeOutBreak.png. Replace it with this one (or any png file you want to use, just name it TimeOutBreak.png):

And voila, the new image is called. Now I just need to figure out how to edit an icon file. :)

hear ye, hear ye

Just found something pretty awesome on the human ear. I like AIG's explanation of things, mainly because they reject the secularisation of everything and make the presupposition that God designed the universe as per the bible's explanation.

Then, using the ears we've just learnt about - check out the Truth for Life podcast, with frequent sermons by Alistair Begg. His stuff shakes up many incorrect assumptions very clearly but directly using the scriptures.

Another podcast you want to check out is that of Ravi Zacharias, called Let My People Think.

Monday, 13 August 2007

the message is clear

On the sacking of deputy health minister Nozizwe Madlala-Routledge:
It seems that climbing in, getting involved and doing something useful are not as highly regarded as being in agreement. You could be useless, just agree that garlic and lemons is good for HIV sufferers, stick around. You could be useful, but a clash or challenge means you're gone.
This "agree with me or you're outta here" attitude is indicative of that of a tyrant. I'm not saying Mr Mbeki fits that description entirely, just that he shares some characteristics, and that, is scary enough.

Now, obviously this is all speculation as no official reason was given for her dismissal. However, I sense something is very wrong.

Read more here.

Thursday, 09 August 2007

a handful of unix (Part 1) (for new mac users): ls, locate, man, export $PATH

Here are some tips which I've needed to use recently in setting up my new mac (yes, I upgraded)... You'll need to use your handy terminal, though I prefer using iTerm. I've also started with very basic commands for absolute newby's:

ls

In terminal, the UNIX commands on a mac are similar to your old DOS commands. With a few noteable exceptions. Go ahead, open up a terminal (Applications -> Utilities -> Terminal) and type the following: ls

ls is short for list, it's similar to the DOS command dir. Now try ls -al
See, more details, including hidden files, which are prepended with a period.

cd changes directory. cat displays the contents of a file. less does the same but allows you to scroll.

man

Very simple. Type man locate to get the manual pages for the locate command. It's a text help file explaining how to use the commands. If you want to see how to properly use the man pages, you can see the man page for man... so that would be typing man man.

locate

This function is the terminal equivalent of Spotlight, except, it looks everywhere! You simply type in locate php.ini, and it finds all the file references of php.ini for you. At first run I got an error message saying the database wasn't present. A brief look in the man page and I found the command to update the database (you should ideally run this every so often to just update all your references for locate. Do this before you run locate if you haven't used locate for a long while) - /usr/libexec/locate.updatedb

(It might be different on your system, so then just read your man page to find out how to update the locate-DB)

export $PATH

OK, this is more of a self note for me, so that I can use it if i need to do this again, because some of the bookmarks I had for $PATH stuff no longer link to valid sites... phhffft. ok.

For a shell script, the PATH variable used is stored in the .profile file (technically if you're using BASH - if you have no idea what i mean, ignore this) in your user directory. You can set up Textmate to respond and edit files by using the mate command from a shell. (here's how)
So, once this is done, open up .profile in Textmate and edit it. Mine looked like this:

test -r /sw/bin/init.sh && . /sw/bin/init.sh
export PATH="$PATH:/usr/local/bin:/Applications/xampp/xamppfiles/bin"
export EDITOR='vi'


I edited this and changed it to:

test -r /sw/bin/init.sh && . /sw/bin/init.sh
export PATH="/Applications/xampp/xamppfiles/bin:$PATH:/usr/local/bin"
export EDITOR='mate -w' #textmate as editor, waiting for file to close before continuing
export LESSEDIT='mate -l %lm %f' #textmate as editor for the LESS command, by pressing v

What export does, is make the PATH variable available to sub shells, and you put it in .profile because that's read when you fire up a shell. A shell is a session in Terminal or iTerm (in simple terms).

Something to remember: UNIX commands in the terminal are case sensitive, which means the command locate will work, but Locate or LoCatE will not work.

OK, most of you are either bored to tears cos you know already, or bored to tears cos you have no idea or inclination to get into the shell. This is for the other folks, yes, both of them!

Thursday, 02 August 2007

mac: nifty way to schedule a task

OK, so I need to run a task frequently on my mac. A daily download of a wallpaper to my desktop from National Geographic, and every two days to do a project backup (which I ought to burn to disk and take off-site).

So, what are my options... cron, and iCal. Yes, I found that out today, as an alarm for an event, not only can I set a chime to go *TING* - I can run a script or open a file... This leaves lots of possibilities!

So, I fire up iCal, add a new task called getwallpaper, and set the time to 9AM. Then I change the repeat option to every day.

Now, my iCal is littered on each day with an obscure entry. We'll deal with that in a moment.

I head over to the alarm selector, and select open file (the script is an app, so the run script option didn't work in this case) - I choose my app which collects my wallpaper.

Now, to tidy up, I click the plus [+] icon in the bottom left corner, and add a new calendar, name it Scheduled Tasks. It should appear in the top left side panel with a tick. Uncheck the tick and the events disappear. So I don't need to be bothered by my scheduled events.

I did the same for my backup, except I set up a Custom repeat option so that it happened ever week on Tuesday, Thursday and Saturday. Next time, I'll use Otto (Automator) to control the backup and zip the file afterwards.

Cron is another more scripty-geeky-terminal way to do this, and I'm keen to explore that when I get a chance. I got this info from here, and they also explain how to do this in Windows.

Here's a grab of the iCal screen, with my nifty National Geographic desktop, before I unchecked the Calendar so that they disappear. Wow, am I really that empty this week?

intolerance

What I got from the Stand To Reason site. Definitely worth checking out...

When Tolerance Is Intolerant

Greg Koukl

There’s one word that can stop you in your track. That word is “tolerance.”

Let’s take a look at the confusing and mistaken ways tolerance is used in our culture today.

Using the modern definition of tolerance, you will see that no one is tolerant, or ever can be. It’s what my friend Frank Beckwith calls the “passive aggressive tolerance trick.” Let’s start with a real life example.

I had the privilege of speaking to seniors at a Christian high school in Des Moines. I wanted to alert them to this “tolerance trick,” but I also wanted to learn how much they had already been taken in by it. I began by writing two sentences on the board

"All views have equal merit and none should be considered better than another."

“Jesus is the Messiah and Judaism is wrong for rejecting that.”

They all nodded in agreement as I wrote the first sentence. As soon as I finished writing the second, though, hands flew up. “You can’t say that,” a coed challenged, clearly annoyed. “That’s disrespectful. How would you like it if someone said you were wrong?”

“In fact, that happens to me all the time,” I pointed out, “including right now with you. But why should it bother me that someone thinks I’m wrong?”

“It’s intolerant,” she said, noting that the second statement violated the first statement. What she didn’t see was that the first statement also violated itself.

I pointed to the first statement and asked, “Is this a view, the idea that all views have equal merit and none should be considered better than another?” They agreed.

Then I pointed to the second statement—the “intolerant” one—and asked the same question: “Is this a view?” They studied the sentence for a moment. Slowly my point began to dawn on them. They’d been taken in by the tolerance trick.

If all views have equal merit, then the view that Christians have a better view on Jesus than Jews is just as true as the idea that Jews have a better view on Jesus than Christians. But this is hopelessly contradictory. If the first statement is what tolerance amounts to, then no one can be tolerant because “tolerance” turns out to be gibberish.

“Would you like to know how to get out of this dilemma?” I asked. They nodded. “Return to the classic view of tolerance and reject this modern distortion.” Then I wrote these two principles on the board:

“Be egalitarian regarding persons.”

“Be elitist regarding ideas.”[1]

The first principle is true tolerance, what might be called “civility.” It can loosely be equated with the word “respect.” Tolerance applies to how we treat people we disagree with, not how we treat ideas we think false. Tolerance requires that every person is treated courteously, no matter what her view, not that all views have equal worth, merit, or truth.

Don’t let this new notion of tolerance intimidate you. Treat all people with respect, but be willing to show them where their ideas have gone wrong. The modern notion of tolerance actually turns this value on its head. It’s one of the first responses deployed when you take exception with what someone has said. “You’re intolerant.”

To say I’m intolerant because I disagree with someone’s ideas is confused. The view that one person’s ideas are no better or truer than another’s is simply absurd and contradictory. To argue that some views are false, immoral, or just plain silly does not violate any meaningful definition or standard of tolerance.

The irony is that according to the classical notion of tolerance, you can’t tolerate someone unless you disagree with him. We don’t “tolerate” people who share our views. They’re on our side. There’s nothing to “put up” with. Tolerance is reserved for those who we think are wrong, yet we still choose to treat them decently and with respect.

This essential element of classical tolerance—elitism regarding ideas—has been completely lost in the modern distortion of the concept. Nowadays if you think someone is wrong, you’re called intolerant no matter how you treat them.

Whenever you’re charged with intolerance, always ask for a definition, then point out the contradiction built in to this new view.

Most of what passes for tolerance today is intellectual cowardice, a fear of intelligent engagement. Those who brandish the word “intolerant” are unwilling to be challenged by other views, to grapple with contrary opinions, or even to consider them. It’s easier to hurl an insult—“you intolerant bigot”—than to confront the idea and either refute it or be changed by it. In the modern era, “tolerance” has become intolerance.

As ambassadors for Christ, however, we choose the more courageous path. In Paul’s words, “We are destroying speculations and every lofty thing raised up against the knowledge of God” (2 Corinthians 10:5). In a gracious and artful way, we accurately speak the truth, and then trust God to transform minds.