How to add a Netlify deploy status badge to your project

Ever since I moved this blog to Netlify I wanted to add a badge to the repository’s README displaying the deploy status. The service doesn’t support Netlify badges yet, but luckily I found out that you can build dynamic badges by querying structured data from any public URL.

After digging into the Netlify REST API, I managed to make a badge that fetches all deploys for my site and extracts the status of the last deploy:

[![Deploy status]($[0].state&colorB=blue)](

Which looks like this:

Deploy status

One shortcoming is that you cannot set a different color depending on the status, that’s why I’m using a “neutral” blue background here. Also, I assume deploy logs must be public for the link (and possibly the badge itself) to work.

Is forgetting a child in the backseat of a car a crime?

Gene Weingarten:

“Death by hyperthermia” is the official designation. When it happens to young children, the facts are often the same: An otherwise loving and attentive parent one day gets busy, or distracted, or upset, or confused by a change in his or her daily routine, and just… forgets a child is in the car.

This is one of the most disturbing, eye-opening articles I’ve ever read, not because those parents are monsters, but because it could potentially happen to any of us.

Quoting David Diamond, a professor of molecular physiology at the University of South Florida:

“The quality of prior parental care seems to be irrelevant,” he said. “The important factors that keep showing up involve a combination of stress, emotion, lack of sleep and change in routine, where the basal ganglia is trying to do what it’s supposed to do, and the conscious mind is too weakened to resist. What happens is that the memory circuits in a vulnerable hippocampus literally get overwritten, like with a computer program. Unless the memory circuit is rebooted – such as if the child cries, or, you know, if the wife mentions the child in the back – it can entirely disappear.”

I think these cases also say a lot about how innocent people, like rape victims, are sometimes blamed by others in order for them to cope with the harsh reality that the world is not inherently fair:

Humans, Hickling said, have a fundamental need to create and maintain a narrative for their lives in which the universe is not implacable and heartless, that terrible things do not happen at random, and that catastrophe can be avoided if you are vigilant and responsible.

In hyperthermia cases, he believes, the parents are demonized for much the same reasons. “We are vulnerable, but we don’t want to be reminded of that. We want to believe that the world is understandable and controllable and unthreatening, that if we follow the rules, we’ll be okay. So, when this kind of thing happens to other people, we need to put them in a different category from us. We don’t want to resemble them, and the fact that we might is too terrifying to deal with. So, they have to be monsters.”

Jeff Atwood wrote a great piece on this behavior in relation to internet harassment, so please check it out.

Migrating from Second Crack to Metalsmith

I’ve just migrated this blog from Second Crack to Metalsmith, mainly because I wanted to switch away from a PHP-based static site generator. I considered using Hugo, specially because it is pretty fast—and it would be nice to learn Go—but I found its template syntax a little off-putting.

It’s now being served by GitHub Pages too, with the code available here. I’ll write some follow-up posts soon detailing the plugins and scripts I’ve used to build and deploy the site.

Stay tuned.

Exercendo a não-opinião como exercício de empatia

Alex Castro:

Quando perguntamos a nossa amiga casada quando ela vai finalmente ter filhos ou filhas, a pergunta nos parece inócua e amigável. Afinal, só estamos perguntando porque temos intimidade, certo?

Entretanto, para a pessoa que está do outro lado, o comentário é opressivo. Porque não é a primeira, nem a vigésima, nem a centésima vez que é feito.

Como essa pessoa pode se sentir acolhida, feliz, aceita entre suas amigas e familiares se praticamente todo dia alguma delas a interpela sobre uma das escolhas mais importantes de sua vida?

A mensagem passada por essa constante enxurrada de comentários, uma mensagem ao mesmo tempo violenta e invasiva, é que a sua escolha de vida, que deveria ser íntima e indevassável, causa enorme desconforto às suas pessoas mais próximas. Se não, por que tanta insistência? Se não, por que tanta intrusão?

Em situações como essa, é ainda mais apropriado seguir o conselho supostamente dado pelo guru indiano Sathya Sai Baba (tradução minha):

Antes de falar, pense: É necessário? É verdadeiro? É gentil? Machucará alguém? Acrescentará algo ao silêncio?

Pense, sempre.