-
João Rocha da Silva
- Senior Full Stack Software Engineer at
-
2021-2022
Senior Full Stack Software Engineer (Tech Lead)
at -
2020-2021
Full Stack Engineer
at - 2016-2020 Invited Professor at FEUP, Postdoc at FEUP InfoLab & INESC TEC
- Even more LinkedIn
Previously
Archive
- October 2024
- Tethering internet from iPhone to a Ubuntu machine and then to a wifi router via ethernet
- May 2023
- Lenovo P1 Gen 2 - My settings for the TrackPoint and Synaptics Trackpad
- November 2022
- iTerm2 (Python API): Automatically starting multiple services in separate panes
- September 2022
- Installing clamav (open-source antivirus) for Mac using macports
- July 2022
- Homebrew: A list of useful casks for NodeJS developers
- Homebrew: Fix Command Line Tools installation on macOS Ventura Beta
- June 2022
- iCloud always full? Organise your AirDrop photos and old hard drives in minutes
- OWC Thunderbay 4 Mini review: 20TB, RAID, Thunderbolt 3 for less than €800
- May 2022
- Automatic synchronization using fswatch and rsync
- April 2022
- Getting Python to install and run on M1 Pro MacBook Pro with macOS Monterey
- March 2022
- Review of my Mac computers, from 2007 to present
- Using a vintage Mac with 10.6 Snow Leopard in 2022
- August 2021
- Generating diagrams from XSD files on Windows
- Git rebase, rolling back commits, and a Sourcetree caveat
- How to make nice diagrams from your databases (SQLite, PostgreSQL)
- Java versions on macOS without pain, complete guide
- July 2021
- 3287% performance boost with 1 line of code? The impact of indexes in PostgreSQL performance!
- June 2021
- My standing desk project: purchase guide, assembly and review
- March 2021
- How to repair MacBook Magsafe and Magsafe 2 chargers
- Convert Standalone MongoDB to Replica Set with WiredTiger storage engine (macOS and Homebrew)
- February 2021
- Splitting videos automatically by length using ffmpeg and the Terminal
- December 2020
- Fixing no Spotlight results on macOS Big Sur
- Finding illegal characters in a directory
- October 2020
- Restoring a dmg file to USB using only the Terminal
- July 2020
- SSH and SCP broken: Fixing `dyld: Library not loaded`
- Make your PDFs searchable using OCR for free on macOS
- Improvising a fan from a PC power supply and a computer fan
- June 2020
- Replacing intel_pstate power management with acpi-cpufreq in Ubuntu
- May 2020
- Solving no keyboard shortcuts after upgrade to Ubuntu 20.04
- Creating Tag page in Jekyll that considers both pages and posts (GitHub pages compatible!)
- April 2020
- Using find and xargs to deep find files in a directory tree and copy them
- Disabling a specific Bluetooth adapter in Ubuntu 19.10 (Hacked Lenovo T420)
- February 2020
- Semi-automated correction of SQL exercises in Moodle
- January 2020
- Static analysis of PHP code using open-source code quality tools
- December 2019
- Download music from YouTube for free using macOS
- November 2019
- Fixing permissions of the public_html folder
- Disable and enable user accounts in Linux
- September 2019
- Fixing `unable to determine url for /Volumes/TimeCapsule in Apple Time Machine`
- May 2019
- Tuning the sensitivity of the Lenovo TrackPoint on Ubuntu
- April 2019
- How to monitor connection leaks
- Fixing broken R packages in Ubuntu 16.04
- RDA Research Data Alliance Plenary 13 at Philadelphia, Day 1
- March 2019
- How to set up a basic venv for python development
- February 2019
- How to set up Automatic Updates on Ubuntu Server with scheduled reboot time
- The story of my highly upgraded Lenovo T420
- January 2019
- My spicy cuttlefish recipe
- Squid proxy cache in an ancient, hacked up Mac Mini 1.1
- December 2018
- How to set up MAMP to enable .htaccess and mod_rewrite debugging
- What is the difference between REST and AJAX?
- How to search for good references for a State of the Art
- Logging out a session properly in PHP
- November 2018
- Install Docker on Ubuntu 18
- No space left on device - Full /boot partition
- October 2018
- Why LaTeX is better for scientific writing
- Installing Semantic Mediawiki, a complete and revised guide
- July 2018
- Fixing locales error in Ubuntu
- Fixing Virtualbox and Vagrant in macOS Mojave 10.14 Public Beta 3
- How to run a command in a Docker container (or how to SSH into a Docker container)
- How to backup MySQL, OpenLink Virtuoso and ElasticSearch database data via command line in Linux
- How to check the size of a directory in linux
- Fixing missing headers for homebrew in Mac OS X Mojave
- I just changed the battery on my Mid-2014 Macbook Pro Retina 13''
- How to add your SSH keys to a server for password-less logins
- How to install Jekyll using Homebrew, Mac OS X 10.14 Mojave Beta
Tethering internet from iPhone to a Ubuntu machine and then to a wifi router via ethernet
Lenovo P1 Gen 2 - My settings for the TrackPoint and Synaptics Trackpad
This post explains how to install the Synaptics driver on Ubuntu 23.04 and how to tune the sensitivity settings on a Lenovo P1 Gen 2.
iTerm2 (Python API): Automatically starting multiple services in separate panes
There are awesome process monitors like PM2 to help manage multiple services, but sometimes you need to boot up multiple fully-dockerized workflows and place them in separate panes for easy log monitoring. iTerm2 has a great Python API to help automatize these repetitive tasks.
Installing clamav (open-source antivirus) for Mac using macports
Using a vintage Mac requires hardening, such as enabling the Firewall’s Stealth Mode, disabling File Sharing options in the System settings, and installing an anti-virus and being overall mindful of which parts of the web you visit. Here is how to install clamav, a free and open-source alternative for older Apple hardware still stuck on older OS’s. We will be using MacPorts for this short tutorial.
Homebrew: A list of useful casks for NodeJS developers
All the casks I usually like to install on a new developer machine.
Homebrew: Fix Command Line Tools installation on macOS Ventura Beta
- Install XCode Beta 14.0 from Apple’s Developer website.
- Open XCode, set path to command line tools using XCode GUI
iCloud always full? Organise your AirDrop photos and old hard drives in minutes
IN CONSTRUCTION!
OWC Thunderbay 4 Mini review: 20TB, RAID, Thunderbolt 3 for less than €800
Automatic synchronization using fswatch and rsync
Here is a simple script to automatically synchronize a local directory with a remote one whenever a local change is detected. Combined with a compiler that watches for changes running on the remote server, it can be used to offload heavy compilation tasks to a remote server while using a less powerful computer to edit sources.
Getting Python to install and run on M1 Pro MacBook Pro with macOS Monterey
In order to get Bash Beautify working on my Mac, I had to have both the
python2
andpython3
commands running on my Mac.Review of my Mac computers, from 2007 to present
Here is a little bit of my personal history using Macintosh computers, from a pet project Hackintosh circa 2008 to the current MacBook Pros powered by Apple Silicon.
Using a vintage Mac with 10.6 Snow Leopard in 2022
Here is a guide on how to use AFP (Apple Filing Protocol) shares to offload heavy compilation operations to a more modern and powerful machine, while using a vintage Mac for simple text editing and viewing the compiled result in the web browser. This may be of use to those of you running older PowerPC Macs, such as the 12-inch Powerbook G4, one of the most beautiful computers ever created. As long as its Mac OS X version supports AFP, you should be good to go.
Generating diagrams from XSD files on Windows
I always loved the Oxygen XML Editor, in particular the way it represents XML Schemas (or XSD’s) in an easy to understand, visual way. However, the price tag is very high, especially when you have to pay for it on a yearly basis.
Git rebase, rolling back commits, and a Sourcetree caveat
Until recently, I used mostly
merge
operations ingit
. However, recently I have been usingrebase
more often.How to make nice diagrams from your databases (SQLite, PostgreSQL)
There often comes the time when you have an existing database and you need to build a nice diagram to analyse it quickly. Here is how to do it using open-source software. We are going to be working on a Mac running macOS 10.14 Mojave, as well as an SQLite database.
Java versions on macOS without pain, complete guide
An ages-long problem that once in a while comes to take a couple of hours away from a developer: How to properly manage multiple versions of Java in a single Mac, and how to switch between them painlessly.
3287% performance boost with 1 line of code? The impact of indexes in PostgreSQL performance!
Slow queries are usually easy to identify, since they take at least seconds or minutes to run. Here I show a different type of optimization procedure for queries that are not expensive when ran once or twice, but that can really take a toll on a system if ran many times. We need to determine the total cost of these small queries so that we can optimize them.
My standing desk project: purchase guide, assembly and review
New standing desk
How to repair MacBook Magsafe and Magsafe 2 chargers
Convert Standalone MongoDB to Replica Set with WiredTiger storage engine (macOS and Homebrew)
If you want to take advantage of MongoDB Change Streams (which will allow an event to be fired whenever a collection is modified instead of polling the database for changes), you need to change your MongoDB instance to a Replica Set. Here is the full process using the Terminal.
Splitting videos automatically by length using ffmpeg and the Terminal
Google imposes a limit of 10 GB per video on uploads to Google photos. I had some very large videos that I filmed on my iPhone and that Google Photos was refusing to backup. A possible solution is to:
Fixing no Spotlight results on macOS Big Sur
After upgrading to macOS Big Sur I noticed that Spotlight would no longer list any local applications or files.
Finding illegal characters in a directory
Sometimes you need to grep for occurrences of invalid files in an entire directory. I personally came across this issue when running htmlproofer to validate this blog’s generated files. Let’s take a look at the error message and then the solution.
Restoring a dmg file to USB using only the Terminal
If you need to restore an image of an old version of Mac OS X (Leopard or Snow Leopard, for example), using a newer version of macOS (Mojave or Catalina) you may encounter messages like this, due to the uselessness of the newer versions of Disk Utility.
SSH and SCP broken: Fixing `dyld: Library not loaded`
Nagging error that happens again and again when I try to use
ssh
orscp
in macOS (since Catalina):Make your PDFs searchable using OCR for free on macOS
Ever encountered a PDF from a scanned document where Ctrl+F does not work? No text selection too?
Improvising a fan from a PC power supply and a computer fan
These days have been blistering hot, so I had to improvise a fan with some hardware I had at home. Here I am using a Corsair AX860 Power Supply and a 120mm Corsair ML120 fan that I had lying around.
Replacing intel_pstate power management with acpi-cpufreq in Ubuntu
After upgrading my T420 with a 1440p panel, I noticed some lag in the user interface. On top of that, once the CPU heats up above a certain level, it will be slow until you restart the computer for some reason. This seems to be around 80ºC, which is very normal if you upgrade your Lenovo T420 to a crazy-hot Quad-Core i7 Extreme CPU like I did.
Solving no keyboard shortcuts after upgrade to Ubuntu 20.04
After upgrading to Ubuntu 20.04 I saw that my keyboard shortcuts no longer worked (
Ctrl + T
,Shift Insert
,Ctrl + V
…). TheSuper
key also was not working.Creating Tag page in Jekyll that considers both pages and posts (GitHub pages compatible!)
A pages+posts “tags” page for your Jekyll blog
Using find and xargs to deep find files in a directory tree and copy them
I was looking for an easy way to install a lot of fonts in Ubuntu. By the way, I discovered a great GitHub repository with many interesting ones here!
Disabling a specific Bluetooth adapter in Ubuntu 19.10 (Hacked Lenovo T420)
This all started because my Bluetooth mouse was lagging and the pointer skipping!
Semi-automated correction of SQL exercises in Moodle
At FEUP we have a Moodle instance provided by the University of Porto. I think Moodle is an awesome tool for e-learning: I use it as much as possible for centralizing lecture contents, organize assignment deliveries and provide not only grades but also individual feedback to my students.
Static analysis of PHP code using open-source code quality tools
While it does not replace good judgement and programming practice completely, it can be interesting to perform regular code quality analyses to make sure that your teams (and students) are writing good PHP code. This is a small guide on how to install them in macOS and how to use them to automatically produce metrics for all code repositories in a folder.
Download music from YouTube for free using macOS
Often you want to download videos from YouTube or extract audio from them.
Fixing permissions of the public_html folder
Sometimes you may not be able to run PHP files or view HTML in a web server. This can be related to permissions and/or the lack of a
.htaccess
file in yourpublic_html
folder.Disable and enable user accounts in Linux
Sometimes you need to disable user accounts (say, people enter and leave the team).
Fixing `unable to determine url for /Volumes/TimeCapsule in Apple Time Machine`
So far, macOS Catalina Beta has been a mixed bag of experiences. After critical crashes to the login screen on Beta 3, Beta 7 seems to be stable enough for daily use.
Tuning the sensitivity of the Lenovo TrackPoint on Ubuntu
I have recently installed Ubuntu Budgie on my Lenovo ThinkPad T420. So far, the experience has been great. However, a crucial part of the IBM/Lenovo experience is the TrackPoint, the red nub at the center of the keyboard. Love it or hate it, for many people it is the main reason to buy a ThinkPad. Here is how I configure it to run on Ubuntu.
How to monitor connection leaks
Database connections need to be managed properly. If we keep opening connections to a database without closing or releasing them (in the case of a connection pool), the database will soon stop responding.
Fixing broken R packages in Ubuntu 16.04
I had an issue with install R on Ubuntu 16.04. Message was about some inability to install a dependency of the main R package.
RDA Research Data Alliance Plenary 13 at Philadelphia, Day 1
Under the motto “With Data comes Responsibility”, the RDA 13th plenary at the beautiful city of Philadelphia.
How to set up a basic venv for python development
Before writing your code, you should make sure that your python environment is easily portable to other machines. None of that “Works on my machine” nonsense!
How to set up Automatic Updates on Ubuntu Server with scheduled reboot time
If you administer servers, you know the importance of keeping your packages up to date for security concerns.
The story of my highly upgraded Lenovo T420
I have a Lenovo T420 that I love because of its unmatched 8-row keyboard. It is old and was slow with its original i5-2520m cpu… but it is very Linux friendly and runs MacOS too. A GitHub user called tluck has compiled everything you need to get it running under MacOS (yes, even Catalina, an OS that no mac from 2011 supports…).
My spicy cuttlefish recipe
Here is a great recipe for cuttlefish, for those that like spicy food. With strong Portuguese roots, I added some oriental touches to give it an Asian twist, but without overdoing it.
Squid proxy cache in an ancient, hacked up Mac Mini 1.1
A proxy cache server acts as an intermediary between your machine and the internet. Say, for example, you have two machines in your network, and a third machine that you want to dedicate to caching web content. Here is how to set it up on a Mac.
How to set up MAMP to enable .htaccess and mod_rewrite debugging
Here is how to enable htaccess overrides in a MAMP server for local development. This is useful to test PHP configurations where you want to use a
.htaccess
file to redirect all requests to a specific file, say, anindex.php
that acts as a router, enabling you to use pretty URIs such as/users
,/users/new
, etc. for your PHP application.What is the difference between REST and AJAX?
A question from one of my students at the Languages and Web Technologies class at FEUP.
How to search for good references for a State of the Art
How to search for good references
Logging out a session properly in PHP
Logging out a user in PHP, the right way.
Install Docker on Ubuntu 18
Installation Script
No space left on device - Full /boot partition
Do you have messages like this?
Why LaTeX is better for scientific writing
Here is my short list of reasons why LaTeX is so much better than Microsoft Word for scientific writing.
Installing Semantic Mediawiki, a complete and revised guide
How to install Semantic MediaWiki on Ubuntu 18.04 LTS
Fixing locales error in Ubuntu
Tired of warning about locales in Ubuntu? Me too, and there is a fix.
Fixing Virtualbox and Vagrant in macOS Mojave 10.14 Public Beta 3
The new beta of Mac OS X Mojave is mostly stable and so far it has been a good experience… Apart from the recent issues that i have faced with homebrew legacy libraries and this recent problem with Virtualbox, which loads a Kernel Extension that has not yet been approved by Apple.
How to run a command in a Docker container (or how to SSH into a Docker container)
Docker containers can be a great way to try out some scripts before they are ready for production. One of the basic tasks is to run a command in a specific container. Here is how to do it.
How to backup MySQL, OpenLink Virtuoso and ElasticSearch database data via command line in Linux
MySQL, ElasticSearch and OpenLink Virtuoso are all dependencies of our research data management platform, Dendro. Here is how we back up the databases.
How to check the size of a directory in linux
How to check the size of a directory in linux, in human-readable form.
Fixing missing headers for homebrew in Mac OS X Mojave
If, like me, you tried installing
imagemagick
or other software using Homebrew, you might have ran into this error:1
<libxml/parser.h> no such file or directory
I just changed the battery on my Mid-2014 Macbook Pro Retina 13''
I just changed my 13’’ MacBook Pro Mid-2014’s battery. Its not easy, but not as hard as I initially thought. The trick is to remove the adhesive with some dental floss or fishing line. Fishing line is actually better because it is made up of a single nylon filament and will be more robust than the dental floss, which tends to break more easily.
How to add your SSH keys to a server for password-less logins
SSH keys allow you to login into your SSH server without having to remember passwords and with much stronger security. It’s like having a super long password that you never have to remember… Just keep your private keys in a safe place.
How to install Jekyll using Homebrew, Mac OS X 10.14 Mojave Beta
This short guide shows you how to install and run a Jekyll blog in your Mac. Mojave broke some things for me in Homebrew, so this addresses some possible issues that you may also face.
subscribe via RSS