Let your Mac read for you

February 26, 2010

In Mac OSX, there’s a very nice built-in speech synthesis program. Some people know it from a skype function that says whitch of your contacts comes online. You can also make your computer read the time out loud for you, at certain intervals.
Anyway. The coolest thing is to make your computer say things you want to hear.

Open a terminal, and type this:
say "please hit that return key once more"

now that’s cool. but more interesting is that you can save that sound to an aiff (apple lossless audio) file.
say -o Desktop/myspeech.aiff "please hit that return key once more"

or you can make it read a txt document for you, and again save the output to an aiff file…
say -o Desktop/myspeech.aiff -f Desktop/myspeech.txt

click here for an audio sample!

have fun!

Advertisements

ASCII Stars

February 26, 2010

A few days ago i created a nice ASCII art php script. I was taking a break from work and i was looking around on the internet for nice ascii art. I saw a wegpage where someone let a script create stars of a certain magnitude. I made a command line script that does the same thing for fun.

for input 1, it gives you this:

asciistars1

for input 2, it gives you this:

etc… it’s quite fun 🙂

you find the script here

to run it, remove the .txt from the end of the filename, open a terminal, and then type this:

php Desktop/stars.php 3

ofcourse, change ‘Desktop’ to the dir where you put it. instead of the 3 type any number below 10

you will need php-cli installed to run this. (installed on Mac OSX by default)

Gnash Youtube

February 25, 2010

I love to test new GNU/Linux distributions. Some time ago i was playing around with Trisquel GNU/Linux, a very nice linux distro. The main goal of that distribution is to have ONLY free software in there, and to have a complete and good OS at the same time.

Now, as we all know, flash is a big issue on Linux systems. The complete open solution to play flash videos is Gnash, the GNU flash player. That is also the flash player you can install on Trisquel. I had some problems viewing youtube videos though, but i found out that the embed player did work! So i made a greasemonkey script to replace the default youtube video player by the ’embed’ player. here it is:

click here for the script (version1)
click here for the script (version2)
click here for the git repository

You’ll need Firefox, IceCat or IceWeasel (completely free versions of Firefox) or Abrowser (UI-stripped and completely Free Software version of Firefox) with the add-on ‘GreaseMonkey‘ for this to work.

Toon

iTunes Clock Radio

February 25, 2010

Check out the iTunes Clock Radio I made to wake up this morning. I was working late yesterday and i knew i would never be able to wake up without some music. So i wrote this small app in 5 minutes, and it worked 🙂

anyway, it might be fun to use or it could come in handy for you, so check it out.

Toon

Backup with Rsync

February 25, 2010

Everyone needs to make backups. Some people copy their most important files to an external hard disk or DVD, others use automated software to do the job for them. Many Mac OSX users use Time Machine, Apple’s backup application. I think i don’t have enough control when i use it. So i started looking for a program that did what i wanted it to do, make incremental backups from folders that i chose, and have the option to exclude files or folders from the backup.

Rsync, a command line (cli) program that’s installed by default on almost all UNIX based operating systems (so also Mac OSX and a whole lot of GNU/Linux distro’s), does the job quite good for me.

rsync -avzru /Volumes/LACIE/ /Volumes/LaCie\ 1 --exclude "/Applications/**" --exclude ".*" --exclude ".*/" --exclude ".*/**"

that’s what i type in the terminal.

  • rsync is the program.
  • -avzru means ‘archive’, ‘verbose’ (more output to the command line), ‘compress’ (use compression to decrease traffic if you use rsync over a network), ‘recursive’ (go into all folders), ‘update’ (don’t overwrite newer files)
  • /Volumes/LACIE/ this is the source external hard disk (notice the “/” at the end!)
  • /Volumes/LaCie\ 1 this is the destination external hard disk. It’s called ‘LaCie 1’, and the backslash is there to see the space as part of the path. (notice that there is no “/” at the end)
  • –exclude “/Applications/**” here i exclude the folder ‘Applications’ from the backup
  • –exclude “.*” –exclude “.*/” –exclude “.*/**” also exclude all hidden files and folders

that’s it 🙂

Toon

Hello world!

February 25, 2010

Nice… I finally got my blog online 🙂

You read that correctly, this is MY blog, i write this for me. It’s my cookbook of Mac OSX and GNU/Linux tricks, php scripts, commands that i need to remember, and other random computer stuff. These ‘things i need to remember’ can of course be interesting to other people as well, and everyone is encouraged to use them (at their own risk).

I’ll be posting soon

Toon