-
Skip network setup when installing Windows 11
To skip the annoying network setup in Windows 11, when starting the installation press SHIFT + F10 In the Terminal that will be shown, enter following: "OOBE /BYPASSNRO" or if your windows version supports it, even better:
Read more… -
Setup mail command in linux
Supposing we have sendmail in the linux server, the easiest way to setup any server without a valid FDQN hostname is using msmtp: apt-get install msmtp msmtp-mta mailutils If used by root, create the file
Read more… -
Adding timezones and substracting dates in python
Python's date and datetime objects can sometimes seem difficult to use when trying to calculate time deltas or when trying to use timezones. There are several libraries to deal with it, however in case no dependencies are required, you can do the following:
Read more… -
Running an Electron app on a Raspberry Pi 4
When trying to run an Electron app in a raspberry pi, a blank window may appear if the gpu is not disabled. This can be fixed at runtime with the command:
Read more… -
Using external javascript in an Angular component
Sometimes is needed to use an external javascript code in an angular component, for example for some analytics, or to use an old library that is already part of the website.
Read more… -
Casting and operations in SQLite
SQLite allows not only to query tables in a database, but also to perform some calculations. Let's suppose we want to divide a number taken from a column with data of type integer by an specific number, for that we need to cast the value as a float and then perform the operation:
Read more… -
Assign internal IP addresses in docker compose
Sometimes it is needed to fix IP addresses in some containers declared in a docker compose file. To achieve that it is needed to configure the network. Lets suppose the network is called mynetwork and we want to assign ip addresses in the “172.
Read more… -
Create user in Postgres via psql
In case it is needed to manually add users in postgres using the psql console is pretty simple. First, access the command line: sudo -u postgres psql Then create the database, user and assign permissions:
Read more… -
How to limit grep results when searching in long lines
The `grep` command is very useful to print lines containing certain patterns. But sometimes we may be looking for something in lines that are extremely long, for example in a minified javascript file.
Read more… -
Replace a string pattern in several files using the sed command and RegExp
Sometimes it is necessary to replace some text inside a file using the sed command. However, what if the text to search for is not fixed but has some pattern?
Read more…