Skip to main content

Posts

Installing Postgres on Linux Lite (Ubuntu)

I have followed these instructions from the Postgres documentation : # Create the file repository configuration: sudo sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' # Import the repository signing key: wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - # Update the package lists: sudo apt-get update # Install the latest version of PostgreSQL. # If you want a specific version, use 'postgresql-12' or similar instead of 'postgresql': sudo apt-get -y install postgresql   After that, I was having trouble authenticating to Postgresql after installing the db server on Linux Lite.  This stackoverflow answer was very helpful. Open the file pg_hba.conf . For Ubuntu, use for example /etc/postgresql/13/main$ sudo nano pg_hba.conf and change this line at the bottom of the file, it should be the first line of the settings: local all ...
Recent posts

Twilio SMS API can't receive...SMS

Careful! I was using the Twilio SMS API for the MVP of Gentle Finance , and I realized too late that Canadian and US numbers can't receive sms from international numbers! Since part of my user base is located in France, that was a bummer. On this page of the Twilio documentation , they say that receiving SMS from a non +1 number may or may not work, unreliably. Their recommendation is to use WhatsApp instead.

I have finished an MVP!

For the longest time I had wanted to create an online service useful enough for people to pay for it. There are different ways to identify a good product idea, and one that is often heard is to build something that you need.For the longest time I thought that I didn't need anything worth building. Last year though, I realized that I was getting frustrated with my expense tracker. It was a mobile only solution, quite cumbersome to use, and lacking a few features that I really wanted. So here we go, I built mine! It's called Gentle Finance, because it aims at making tracking your expenses gentler on your emotions than the existing solutions. Its aim is to make it as SMOOTH as possible to track your own expenses. You can request access to the beta version on the Gentle Finance landing page . If you do, let me know what you think via the form!

Windows 11, bootable USB device not detected

 I recently needed to install a linux server on a new computer. The current operating system was windows 11. I decided to go with Ubuntu server. After following their instructions on how to download and create an .ISO image with Rufus , I had a problem: my USB key was not detected by the new computer as a bootable key. It turned our that the solution was the USB version. My USB key was 2.0. After doing exactly the same operation on a USB 3.0 device, everything worked fine. Bonus tip: on windows, to boot from a device, it's possible to restart the computer while holding the SHIFT key. The computer will restart and then display a menu from which you can access the different ways of booting your system. This menu will include any bootable device. Hope it helps!

How to generate a self-signed certificate with Openssl (using git windows bash)

I recently needed to generate a self-signed certificate to test a website locally. I wasn't familiar with the process, and I wanted to share here what I learned. First, we need a private key. A private key is a long series of characters that must be kept secret. In my context, it will be used to encrypt messages before the client and the server, in a way secure enough to prevent anybody to spy on them. Once the private key is created, we need to generate another file that will be the "signature" of our certificate. Among other data, this file will contains some information specific to the server's context: country, organization's name, email address of the organization's technical contact, etc. Once this signature is established, there are two paths: - Path A: If we want our server to be publicly accessible, every browser in the world must able to trust the certificate. In order for that to happen, we need to send our signature file to one of the official SSL ...

How to use wxWidgets on Windows with a Makefile

 Hello! I wanted to learn GUI rpogramming in C++. One of the main libraries for this purpose is called wxWidgets. It's very popular and seem powerful enough to make even a complex graphical interface. I also liked the fact that it's multi platforms. I am on Windows, using MingW and I like coding with VS Code. I also like having a clear Makefile to generate my programs. So here is how I have managed to compile the Hello World program you can find on the wxWidgets website . First, go to their github repository and clone it in a folder you will keep on your computer. In the root directory, run the command git submodule update --init. If the clone operation has not done so already, this command will pull additional repositories needed by wxWidget. Go to build\msw. Run the command: mingw32-make -f makefile.gcc -j4 SHARED=1 UNICODE=1 BUILD=debug clean. It will delete any unwanted file. Once it's done, re run the command but without the clean instruction. This will build the lib...

How to Compile a GTK4 program on Windows (using MSYS)

  I wanted to create a GUI program using C and GTK. I am using a windows operating system, so I had followed the instructions from the GTK Windows installation page . However, when trying to compile my program using: gcc main.c -o main.exe `pkg-config --cflags --libs gtk4` I had the following errors: gcc.exe: error: pkg-config: No such file or directory gcc.exe: error: gtk4`: No such file or directory gcc.exe: error: unrecognized command-line option '--cflags' gcc.exe: error: unrecognized command-line option '--libs' I noticed that the command  pkg-config --cflags --libs gtk4 was actually returning a list of required includes. It seemed that the gcc command simply was not able to recognize them. To solve the problem, I then created a Makefile, in which a variable called GTK_4_INCLUDES contains the list of includes.  The compilation command becomes:   gcc main.c -o main.exe $(GTK_4_INCLUDES) To compile the program in the console, I just had to type mingw32-make , a...