How to undo a git push --force and undelete things

Today someone asked for my help to undo a git push --force that messed up his production server by overwriting the master branch with something that wasn't meant to be there.

My first advice would be to not deploy to production servers by manually running git pull or git push, but that's another story. ;)

So how would you solve the situation? It's actually quite simple but if you don't know some details about how git works, it can seem a bit daunting.

If you're in a hurry and know what you're doing:

1.

More

SSL POODLE vulnerability

The recent SSLv3 POODLE vulnerability is a tricky one, because there's no patch and you actually have to do the hardwork yourself.

More

Like a girl

Today I saw this video on a friend's Facebook profile (or "wall", like it's called nowadays, because "profile" probably isn't cool enough - yes, I'm probably getting old).

I kind of like it. The message is a positive one, the music is good, and it's not "brainless" like so many other similar campaigns. But I only "kind of" like it.

More

It's a plastic world

A short movie well worth watching.

I always wonder why so many people know about these issues, at least minimally, and still insist on maintaining their atrocious consumerism behaviours, throwing things away, not recycling anything. Recycling is not the solution but it's much better than the alternative. Still, people prefer to turn a blind eye and keep acting like environmental criminals.

More

Conversas avulso 2 - Rotundas

Hoje aconteceu-me algo que já aconteceu muitas outras vezes: alguém que não sabe o código da estrada quase me arrancar a parte da frente do carro quando se atravessa à minha frente no meio de uma rotunda. A diferença é que hoje decidi fazer algo quanto a isso.

Sinal vermelho numa rotunda de duas faixas e por onde passa o elétrico de Almada (sim, aquilo é um eléctrico, não é um "metro"). Páro na faixa de fora e ligo o "pisca" para a direita, pois ia sair da rotunda na próxima saída.

More

Swans feeding fish hoax (or "swans do not feed fish")

Swan trying to get his food wet so he can swallow it and Koi fish trying to get some of it

A few years ago I saw this video and lately it has been coming back in some social networks.

Lots of people seem to think the swans are feeding the fish and if you search for "swans feeding fish" videos, you'll find [quite](https://www.youtube.com/watch?v=pdRw

More

How to test if your server is vulnerable to Heartbleed exploit

If you heard of the "heartbleed" vulnerability and are interested in testing your servers, here are a few websites that may come in handy:

More

How to add a slave to a MySQL replication setup with no downtime

Recently I had to add a new MySQL slave server to an existing master -> slave setup, without causing any downtime. Having done that only a couple of times in the past and never having played the central role in the process, I wanted to make sure I was getting everything right, so I did a lot of research but couldn’t find all the best (or what I consider the best) bits and pieces in one single place, so I am documenting everything here for future reference and hopefully they will also help others.

More

A TMN não sabe contar dias

Mais uma da TMN. Já não é a primeira vez que a TMN quebra as suas próprias regras, por isso não me espanta. Nem vou perder muito tempo com isto, vou só deixar aqui o email que lhes enviei. E para quem sabe das minhas desventuras anteriores com eles, sim, infelizmente ainda sou cliente da TMN. Dependendo da resposta que obtiver a este email, pode ser que essa situação finalmente se altere.

Caros Srs.,

More

Pepsi, Cristiano Ronaldo e os Portugueses - parte 2

Tem havido por aí alguma gente a dizer que o que escrevi ontem sobre a palhaçada da página anti-pepsi foi um exagero, que fui mal educado sem razão, que acabei por descer ao mesmo nível dos que critico, e acima de tudo parece que toda a gente se está a focar no futebol.

Pois eu tenho a dizer que todos estão a perder o ponto "maior" disto.

Eu não disse que o problema é o futebol ou a alienação do povo por causa do mesmo.

More