Articles
TIL - Rails XOR validation
Jul 10, 2024 · Coding
Learn how to implement XOR (exclusive OR) validation in Ruby on Rails models to ensure exactly one of two fields is present.
TIL - Git log between dates
May 08, 2024 · Coding
A quick tip on how to check logs in a period
TIL - seq
May 08, 2024 · Coding
A quick tip on the seq CLI utility
Thank you Armand for the Carquinyolis
May 05, 2024 · life
Early this month I had the opportunity to travel to Spain for my company’s yearly gathering, Facts by Factorial. I traveled with Osvaldo and arrived a couple of day’s early, so we took the opportunity to visit Armand, a fellow and dear co-worker, and see the famous Tarrasa. Armand gifted us with a typical Catalan treat – Carquinyolis – which my family enjoyed so very much. But rather than just saying “thank you”, I decided to complicate it.
How to get a list of commits that came before a specific one
Dec 26, 2023 · Coding
A quick tip on how to get a list of commits that came before a specific one.
Find a commit by title or message
Dec 26, 2023 · Coding
A quick tip on how to find a commit by title or message.
Serviços públicos online em Moçambique
Sep 01, 2023
Esta página contém uma colecção de links para os serviços públicos online em Moçambique. O artigo original não é de minha autoria. Apenas tenho observado esta mensagem de utilidade pública circulando pelas redes socials, especialmente Whatsapp com o título “Informações úteis para aceder aos serviços públicos via on-line em Moçambique” e sendo recorrentemente pedida, pelo que fiz esta página para ter a informação em um único sítio de referência facilmente acessível e pesquisável pela internet. Irei fazer o esforço para enriquecer a lista e mante-la actualizada.
Cloud Study Jam Maputo - a short summary
Mar 09, 2019 · Coding
Today, we had another Google Cloud Study Jam Maputo event. This time it was focused on introducing the participants to Data Science concepts and how to apply them using Google Cloud Platform’s tools.
Famous Vim users (that are not famous for using Vim)
Feb 15, 2019 · Coding
Having read “Famous Emacs users (that are not famous for using Emacs)”, I thought I’d do the same for Vim, just to keep the war going :trollface:
Splitting and Naming Test Cases Better
Nov 08, 2018 · coding
Test Doubles: A Primer
Oct 24, 2018 · Coding
A few MySQL subtleties and how to go about them
May 04, 2018 · Coding
Re-learning the JavaScript inheritance that doesn't exist
Apr 06, 2017 · Coding
This post is not about getting started with JavaScript OO, it’s rather about clearing the confusion in our minds about JavaScript OO concepts. Specifically it’s an attempt to mark in my head a simple truth: there’s no inheritance in JavaScript…there’s no such thing as prototypal inheritance.
Writing reliable and robust code with Design by Contract
Jan 08, 2017 · Coding
This article explains: what Design by Contract is; how it came to be; why it helps us writing reliable and robust code; and why the technique should be on every developers toolbox. It also provides a code snippet succinctly explaining how it can applied in a simple common day-to-day scenario.
Simple JavaScript Currying Using bind
Oct 12, 2016 · Coding
In this blog post I tell you a short story about how I was introduced to JavaScript function currying”
Improving the Flask cache decorator
Aug 26, 2016 · Coding
dash(hyphen), ndash and mdash
Aug 03, 2016 · Coding
This article is more related to grammar and small details in language rather than the usual (coding). It tells how (accidentally) through reading code I came to learn that we actually have three (3) kinds of dashes instead of just one. I wrote this short post just so: we don’t forget about them; their differences and when to use each.
BEM - block__element--modifier
Aug 02, 2016 · Coding
Have your browsed through the internet lately and then view-source(d) on some pages? Have you noticed that almost all CSS classes resemble this pattern: some-thing__other-thing---change-looks — mind the double underscores and double dashes… Wondering what’s that?
MySQL queries fail due to ONLY_FULL_GROUP_BY sql_mode after updating to v5.7.*
Jun 21, 2016 · Coding
Recently, on an live project, we’ve updated our MySQL server version so we could use the new JSON field introduced in v5.7.8. We were successful in our quest, but, what we didn’t expect, was the following stream of errors in queries. Find in this post, what caused these errors and how we fixed them (or at least circumvented for the time being)
Interview during the SeedStars World - Maputo 2015 Contest!
May 26, 2015 · Startup
Watch the interview during SeedStars Maputo contest, where Sk (personal side project startup) participated presenting its Maparato project.
Colocando Proxy no Ubuntu
Aug 23, 2014 · Coding
Como configurar um proxy de rede no Ubuntu
Alargando o HD no VirtualBox
Aug 16, 2014 · Coding
Para alargar um disco virtual no VirtualBox, usa-se o comando VBoxManage em um Terminal de comandos.
Recuperando uma BD sem o Log
Aug 15, 2014 · Coding
Testes unitários com SmtpClient
Aug 03, 2014 · Coding
Ao desenvolver um sistema que envie emails, geralmente não se deve enviar os emails quando se efectuam testes. Pelo contrário, os emails devem estar disponíveis para investigação / avaliação de resultado e/ou debugging. Como sempre existem várias alternativas para resolver este problema: Fakes, Mocks ou a Implementação padrão.
Restaurando um backup de Share Point usando apenas a base dados
Jul 26, 2014 · Coding
Então você tem que restaurar um backup de SharePoint mas não consegue fazê-lo usando a interface do Central Administration, pelos mais variados erros. No entanto, você tem acesso directo a base de dados de conteúdo via SQL Server ou consegue identificar o ficheiro de backup da base de dados de conteúdo dos outros na pasta onde tem o backup da farm do SharePoint.
Medindo o progresso de queries em SQL Server com DBCC!
Jul 25, 2014 · Coding
Então, hoje, depois de conseguir corromper uma base de dados tive de usar um bando de truques para conseguir restaurar a base de dados. Um dos passos envolve usar o comando DBCC CHECK que leva muito tempo. Após uns 30 minutos estava em pânico e impaciente porque o processo demorava e não tinha ideia de quanto o processo já havia corrido. Como todo bom Googler fui googlar, e eis que achei a solução: Dynamic Management Views (DMVs).