Add Git submodules

Add Git submodules

This post was not written by any artificial intelligence model.

Sometimes when we want to add another git repository to our project to use it as a dependency, we have a directories structure that needs to have it inside a specific directory. For exmaple, let’s say we have something like this:

.
├── lib
│  └── our_submodule_should_be_here
└── src
   └── main.c

So, you just have to go to that directoy, for example:

Read more →

Compress Video Using The Terminal

Compress Video Using The Terminal
Photo by Sanjeev Nagaraj on Unsplash

FFmpeg is a command line tool that offers a lot of options to manipulate video and audio files. In this post I will show you how to compress a video file using it.

We usually use FFmpeg in a terminal, there are also graphical interfaces that use it as a backend. For example, HandBrake is a graphical interface that uses FFmpeg to compress video files. But in this post we will use FFmpeg directly.

Read more →

How to Use Onboard Raspberry Pi Pico Temperature Sensor (Arduino)

How to Use Onboard Raspberry Pi Pico Temperature Sensor (Arduino)
Photo by Vishnu Mohanan on Unsplash

Some days ago, I tried to use the onboard temperature sensor of the Raspberry Pi Pico using Arduino, but I only found tutorials for MicroPython. Affortunately, I found a Github issue where someone answered how to do it. So, I decided to create a library based on that code and I want to share it with you. The issue is here.

Consider giving a star to the repository if you find it useful. You can find it here.

Read more →

Copy to Clipboard using Jetpack Compose

Copy to Clipboard using Jetpack Compose

In this article we’ll learn how to create a function for copying text to the clipboard. The method for managing context in the application is slightly different.

The app I’m using for this example is a password manager where I need to copy to clipboard the text from the text field. You can find the project on my Github at this link: https://github.com/DeimosHall/Glocker.git. However, you can follow the steps in your own app.

Read more →

Cut video on a linux terminal

Cut video on a linux terminal
Photo by Wahid Khene on Unsplash

If you want to cut a video but you don’t want to open a video editor, you can use a terminal utility called “ffmpeg”.

On Debian/Ubuntu based systems we can install it with:

sudo apt install ffmpeg

Now we can use the following command to cut a video:

ffmpeg -i input.mp4 -ss 01:29:23 -to 01:35:02 -c copy output.mp4

Explanation

With “ffmpeg -i input.mp4” we say we want to use the video called “input.mp4”. It’s important to use the mp4 file extension.

Read more →