To be absolutely certain about something, one must know everything or nothing about it. Olin Miller

Mysql Server 6.0 online backup script

Got some good news there sport fans (actually MySQL fans, but who really reads this anyway), the script got updated for the 3rd and probably final time (lie).

It can perform backups for earlier versions of Mysql (5.*, 4.*) using the mysqldump utility, it will auto-detect the backup type it performed and select the appropriate way of restore "on the fly". Of course you can use mysqldump on version 6.0 but why would you want to do that! :)
Another option was added in the config_file so be sure to check it out, when upgrading. (BTW upgrading using the install will replace your config-file)

Mysql Server 6.0 will be a great database when it reaches GA level, unlike it's earlier version (5.1, 5.0, 4.*) Mysql 6.0 has a lot of new features.
The one that stands out IMO is the possibility of performing a hot database backup ( AKA online).

You can simply connect to the server with the mysql client and: BACKUP DATABASE database TO 'path/to/backup/backup.bkp'; and that's it, you just backed up your database.
When restoring it's enough to issue this command RESTORE from 'path/to/backup/backup.bkp'; and you're done.


Php emailing script

I wrote this a couple of years backup, I put a lot of effort into it back then.
(it really seems kinda stupid now)

#!/usr/bin/php
<?php

Did you know Bash is this powerful ?

A couple of interesting bash stuff I found on the www:
(It's Public Domain)

1. Shell variables can be specified like $var or this ${var}.
$ var='a.ads,fssd2342%asd234#@.,&%,sdfgsdfgas4352'
echo ${var}
a.ads,fssd2342%asd234#@.,&%,sdfgsdfgas4352
2. ${#var} is the length of the variable.
$ echo ${#var}
42
3. ${var:pos} substrings the variable starting at pos.
$ echo ${var:10}
2342%asd234#@.,&%,sdfgsdfgas4352
4. ${var:pos:len} substrings the variable starting at pos with a max length of len.
$ echo ${var:10:5}
2342%
5. ${var#pattern} strips pattern from the front or left hand side of the variable. This form is not greedy meaning it stops as soon as the pattern is matched. ${var##pattern} is the greedy form.


Bogomips, threads, busy-loop, spinning and other friends

Bogomips -- unscientific measurement of CPU speed made by the Linux kernel when it boots, to calibrate an internal busy-loop.
In other words ""the number of million times per second a processor can do absolutely nothing" :)

Busy waiting or spinning is a technique in which a process repeatedly checks to see if a condition is true.

I found this script on wikipedia that implements a "busy-loop" using pthread.h.
So basically a thread is waiting for another to increment the value of an integer "i", and when this happens it prints something like "i was updated, value of i is "bla...bla".


Difference(s) between a System V and BSD

This article is *really copied* from:

http://searchenterpriselinux.techtarget.com/expert/KnowledgebaseAnswer/0...

But guess what? :) The website won't really show you the article cause they make you login in / create a member account to see it, so believing in freedom of information I'm going to post it here :

UPDATE: Only If the referring site is google.com you get prompted for registering

As you may know, Unix was "invented" in 1969 and developed in the 70's. By the 80's there were two distinct branches, System V and BSD. System V was always considered more commercial, while BSD was the university model, and was developed during the 80s at the University of California Berkeley. The original Sun OS was based on BSD, though BSD eventually died a slow death with Sun moving to Solaris.


The Linus Torvalds we all love

Everybody knows who Linus is right? Just to be sure, here is what wikipedia says:
"
Linus Benedict Torvalds [ˈliːnɵs ˈtuːrvalds]; born December 28, 1969 in Helsinki, Finland) is a Finnish software engineer best known for having initiated the development of the Linux kernel. He later became the chief architect of the Linux kernel, and now acts as the project's coordinator.
"

Famous quotes:


Google Fellow: Jeff Dean at Univ. of Washington

Interesting colloquium (video recorded) from the University of Washington where Jeff Dean, Google employee and fellow, known for his great work within the Google corporation talks about Google's existing hardware and software infrastructure and several of their problems and ways of solving them.

From:
http://norfolk.cs.washington.edu/htbin-post/unrestricted/colloq/details....