Publications


Posts

Anatomy of an HTTP request

- 5 mins read

HTTP, for Hypertext Transfer Protocol, is the main protocol for Internet exchanges. It’s used by the browser you’re using to read this article, as well as by other applications. It’s based on an exchange of requests and responses, between a client and a server, in text format. The advantage of text format is that it’s easy to implement in any programming language. The HTTP protocol is specified in RFC 2616, the very first version of which dates back to 1990.

xdotool cheatsheet

- 1 min read

I played a lot these days with xdotool, to try to automate some stuff for my Elgato Streamdeck.

These are the things I try to do:

  • Select a window, and send a Keyboard sequence (such as CTRL+B to mute/unmute a Teams call)
  • Type emojis to the active window πŸ˜…
  • More a window around, or resize it

Here are some links that I found about xdotool:

Below are the commands I found useful during my research.

As I prepare and run a lot of scripts, sometimes I need to run a script at a precise time of the day.

When a script must be only run once, cron is not a viable solution. So I discovered the at scheduler

You need to install it first, using apt as usual.

$ sudo apt install at

Schedule a command to run

  1. use the command at with a time / date
  2. input the commands to run in the prompt
  3. type CTRL+D to exit (^D)
$ at 9AM       
warning: commands will be executed using /bin/sh
at> cd workspaces/github/dotfiles
at> git pull
at> <EOT>
job 1 at Sat Apr 16 09:00:00 2022

This example will pull a repository contents at 9 AM tomorrow !

This short articles shows how to setup a global .gitignore file, to exclude files or directories for all your git repositories.

This is very useful for editor files or .env file, and prevents accidental commits. I also added common directories for Java and NodeJS related developments (target/ and node_modules), and IntelliJ IDEA files (*.iml and .idea/)

Thus said, you should also always setup a .gitignore file in your projets, as the global file only work for you, and will not be shared with the code of your project.