Sunday, January 30, 2011

Tom Waits - Chocolate Jesus

Tom Waits - What's He Building?

How to log all MySQL queries

I just found this very useful tip on how to make MySQL log all queries to a text file.

Basically, you just have to add the following config to your my.cnf and restart mysqld:
log = /var/log/mysql-queries.log

Now...does anybody know how to make it only log queries made against a specific database? :o)

Don't you just hate it when it happens?! ;o)

Friday, January 28, 2011

INSOLITO Chamada Impossivel do INEM para Bombeiros

QUEM EXPLICA ISTO?

Vi isto no Facebook agora mesmo:
"Isto é algo realmente estranho...
Este ano vamos experimentar quatro datas incomuns... 1/1/11, 1/11/11,
11/1/11, 11/11/11 e Tem mais!!!
...
Agora vão descobrir, pegue os últimos 2 dígitos do ano em que nasceu
mais a idade que você vai ter este ano e a sua soma será igual a 11 ou 111
para todos!
ALGUÉM CONSEGUE EXPLICAR O QUE É ISTO????(Gaspar Alberto Costa)"

Pois bem....
SERA porque este ano e 2011 e porque estamos a fazer contas somando o ano em que nascemos ao numero de anos que temos?! :oD
Aqui fica algo AINDA MAIS SURPRENDENTE! (e vou ser BRUXO porque estou a fazer futurologia) ;o)

Daqui a 100 anos leiam esta mensagem e facam o exercicio: "pegue os últimos 2 dígitos do ano em que nasceu mais a idade que você vai ter este ano e a sua soma será igual a 11 ou 111 para todos!"

Ja agora, isto nao funciona para TODA a gente :oP
As pessoas mais velhas do mundo (vivas neste momento e verificadas) tem 114 anos.
Se fizermos este teste para alguem que nasceu a 1896 vamos ter 1 resultado de 210 ;o).


Sao daquelas coincidencias que nao sao coincidencias nenhumas :o).

Thursday, January 27, 2011

VMware vCenter ConverterTM

This just saved my life! ;o)

I had to import a vm to vmware esxi that had been created with another vmware server version and this was, by far, the easiest way to do it! Yay!

Give it a try! :o)

Wednesday, January 26, 2011

Upgrade PHP 5.1 to PHP 5.2 on CentOS

Now THIS was extremely useful:
"On CentOS as of this post, there are no simple 'yum' upgrades to update your PHP 5.1.6 to PHP 5.2.6
The instructions here will show you one possible way you can do this.
First checkout this site
http://www.jasonlitka.com
http://www.jasonlitka.com/yum-repository/
This site has the repositories that will upgrade your PHP 5.1 to 5.2
nano -w /etc/yum.repos.d/utterramblings.repo
... and then paste the following into the editor: 
[utterramblings]
name=Jason's Utter Ramblings Repo
baseurl=http://www.jasonlitka.com/media/EL$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
NOTE: If the above URL returns a 404 then try hard-coding $releasever to your EL version ('EL4' or 'EL5') and the $basearch to whatever is appropriate ('i386' or 'x86_64').
For those new to linux, the nano command is for a linux editor, and once you type the 6 lines, press ctrl O to write the file and press enter to save to the file name given.
Once you've taken care of the above, you'll be able to easily upgrade with a simple 'up2date -u' or 'yum update'.
If you get dependency errors, if you do 'yum update', you might want to try just the php update by trying 'yum - y php update'.
Updating:
 php                     x86_64     5.2.6-jason.1    utterramblings    3.9 M
 php-cli                 x86_64     5.2.6-jason.1    utterramblings    2.7 M
 php-common              x86_64     5.2.6-jason.1    utterramblings    494 k
Updating for dependencies:
 php-devel               x86_64     5.2.6-jason.1    utterramblings    568 k
 php-gd                  x86_64     5.2.6-jason.1    utterramblings    342 k
 php-imap                x86_64     5.2.6-jason.1    utterramblings    112 k
 php-ldap                x86_64     5.2.6-jason.1    utterramblings     61 k
 php-mbstring            x86_64     5.2.6-jason.1    utterramblings    1.3 M
 php-mysql               x86_64     5.2.6-jason.1    utterramblings    275 k
 php-odbc                x86_64     5.2.6-jason.1    utterramblings    120 k
 php-pdo                 x86_64     5.2.6-jason.1    utterramblings    166 k
 php-xml                 x86_64     5.2.6-jason.1    utterramblings    336 k
 php-xmlrpc              x86_64     5.2.6-jason.1    utterramblings    135 k
after the initial php and its dependencies are updated you can update the rest.
#yum –y update –gets errors to install the list below…so just yum install each separately.
eg: #yum -y apr apr-util update
Updating:
 apr                     x86_64     1.2.12-2.jason.1  utterramblings    266 k
 apr-util                x86_64     1.2.12-5.jason.1  utterramblings    166 k
 ed                      x86_64     0.2-39.el5_2     updates            49 k
 httpd                   x86_64     2.2.8-jason.3    utterramblings    2.6 M
 mod_perl                x86_64     2.0.3-14.jason.1  utterramblings    5.5 M
 mysql                   x86_64     5.0.58-jason.2   utterramblings    6.5 M
 mysql-devel             x86_64     5.0.58-jason.2   utterramblings    2.9 M
 mysql-server            x86_64     5.0.58-jason.2   utterramblings     11 M
 pcre                    x86_64     7.6-jason.1      utterramblings    592 k
 php-pear                noarch     1:1.6.2-1.jason.1  utterramblings    418 k

Ok, just found this new option to upgrade to php 5.2
Virtualmin repositories
That repository URLs are:
i386: http://software.virtualmin.com/bleed/centos/5/i386/
x86_64: http://software.virtualmin.com/bleed/centos/5/x86_64/
There is also a release package to automatically configure yum to use these repositories, which can be installed with the following command:
rpm -ivh http://software.virtualmin.com/bleed/centos/5/i386/virtualmin-bleed-release-1.0-1.rhel.noarch.rpm
rpm -ivh http://software.virtualmin.com/bleed/centos/5/x86_64/virtualmin-bleed-release-1.0-1.rhel.noarch.rpm
you will need to install the virtualmin key first. Just type in the code below at command line.
#rpm --import http://software.virtualmin.com/lib/RPM-GPG-KEY-virtualmin"

Friday, January 21, 2011

Thursday, January 20, 2011

Tuesday, January 11, 2011

Retrocast (by Celso Martinho)

Here is something really interesting and ingenious.

Celso Martinho decided to glue some code together (as well as some existing applications) to create a very ingenious game streaming application that works over Skype and websockets.



Check out his blog for more details
My hat goes off to him! :o)

Friday, January 7, 2011

Voto Nulo versus Voto em Branco

Estive a pesquisar brevemente sobre como poderia votar estando emigrado e parece-me que:
- e necessario transferir a minha inscricao no territorio nacional para o estrangeiro;
- os votos por correspondencia tem de ser analisados por uma comissao.

Mas o que realmente achei interessante foi ter visto a explicacao da Comissao Nacional de Eleicoes sobre a diferenca entre o Voto Nulo e o Voto em Branco:
"33 – O que são e para que servem os votos brancos e nulos?
O voto é nulo quando o boletim tiver:
Cruzes em mais de um quadrado ou se houver dúvidas sobre qual o quadrado assinalado;
Uma cruz marcada num candidato que tenha desistido de concorrer às eleições ou que não tenha sido admitido;
Qualquer corte, desenho ou  rasura ou quando  tenha  sido escrita qualquer palavra.
O voto é branco quando o boletim não tiver qualquer  tipo de marca.
Os  votos  brancos  e  nulos  não  contam  para  eleger  o Presidente  da  República  e  apenas  contribuem  para reduzir a abstenção" (visto aqui).

Curioso como as pessoas TENTAM diferenciar o voto branco do nulo e do nao votar sequer.
Parece-me que a CNE e bastante clara na sua explicacao. Reduz as estatisticas de abstencao mas nao continua a nao valer absolutamente de nada ir votar em branco versus nem sequer ir la votar.

Afinal o fantoche tambem se mexe... :o)


Yeaps, mexe sim.

Porque raio acham que ele esta sempre calado? Agora percebe-se bem... :o)
Eu realmente ja tinha estranhado como alguem podia ser "tao perfeito" sem tomar qualquer accao, so poderia ter algo a esconder...

Monday, January 3, 2011

The Biggest Loser competition, starts today!

Yeaps, the day has arrived! :o)

The awesome company i work for organized a "Biggest Loser" contest to see if we fatties get in shape!
It started today and will last the next 3 months.

I just weighed myself and i'm currently at 299.2 pounds! (135.7 kilos...eek! :oP)
Which means i've gained around 37 kilos since i moved here in November 2009!

Well...i'll look at the bright side, it's still less then the 151 kilos i weighed 2 years ago...(though no excuse not to lose weight)!

I love eating but...i've been feeling kind of sick lately (i mean, i feel the extra weight real bad and feel that i have almost no resistance - especially when compared to how i was back in 2009...).

This challenge will be awesome as going up "against other people" is a really big motivation :o).

Well, i'll keep you all posted with the advances of my attempt to get back in shape (yet again)!
But one thing i can promise: i will either be extremely successful on this challenge or fail miserably ;o)

So, one thing to keep (yet again) in mind will be the need to MAINTAIN the weight loss (if i do manage to lose weight)!

The hard part is that it is so easy to slip (and i've proved that to myself several times in the past). And you know why?
Because that first month when you start letting yourself go and eating whatever you want, you don't actually notice the weight coming back and that, my friends, IS one of the BEST feelings in the whole world!

James Randi's fiery takedown of psychic fraud

And DOUBLE AH! :o)

James Randi exposes James Hydrick

Ah... :o)