Boot Linux without a splash screen

If you prefer to boot up your Linux machine with the boot messages rather than the distro splash screen. You can enable that by editing the file /etc/default/grub and set the value of GRUB_CMDLINE_LINUX_DEFAULT to an empty string. Example: GRUB_DEFAULT=0 GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="" GRUB_CMDLINE_LINUX="" After editing the file, execute update-grub to load your configuration into the bootloader. sudo /usr/sbin/update-grub Output of update-grub Generating grub configuration file ....

August 5, 2023 · John Pili

Start a React project without using CRA

Let’s start a React project without using create-react-app (CRA). CRA is a good project starter but for those who wants a complete control over the building process, we will have to use bundler tools like webpack or yarn. Prerequisites React.js knowledge Installed and configures NodeJS Installed node package manager (npm) Steps Using the command-line, let us follow the following steps: Create directories and files mkdir webapp cd webapp Let us continue with our src folder and placeholder files...

May 30, 2023 · John Pili

The Pragmatic Programmer - It's your life

A sound bite from The Pragmatic Programmer: Your Journey To Mastery, 20th Anniversary Edition (2nd Edition) Interested? You can grab a copy of this book from Amazon.

January 17, 2023 · John Pili

Change your SSH server port to reduce brute force attacks

Reduce SSH brute force attacks by changing your default SSH server (sshd) port from port 22 to a different one. Below is a sshd log example of a brute force attacks. Changing the port You can change the default port by editing the sshd configuration file. sudo nano /etc/ssh/sshd_config Find the line that say #Port. Remove the # symbol and set the port number you prefer. Refer to the image below as reference....

December 27, 2022 · John Pili

Rsync with different SSH port

Some Linux servers were security hardened by changing the default SSH port from port 22 to a different port number. To use rsync with a different SSH port, add ‘ssh -p 12345’ in the rsync parameters. Push rsync -azvP -e 'ssh -p 12345' SOURCE USER@HOST:DEST Pull rsync -azvP -e 'ssh -p 12345' USER@HOST:SOURCE DEST

December 26, 2022 · John Pili

Golang with reCAPTCHA

Google’s reCAPTCHA is one of the tool we can use to stop malicious internet bots from abusing our web applications. It comes in two versions, reCAPTCHA v2 and v3. Version 3 uses a score-based method with no user interaction. Version 2 uses a checkbox that will require users to answer a question. In this tutorial we will focus on reCAPTCHA v2. Prerequisite This tutorial requires the following: Registered Google webmaster account Domain registered property in Google webmaster Created Google reCAPTCHA account – https://www....

December 18, 2022 · John Pili

Embed Resources in Go

The go:embed feature was introduce in Go 1.16. It lets you embed resources into the compiled application. Prior to version 1.16, developers uses external tooling to do this. With go:embed you can embed images, webpages, email templates, predefined SQL statements or an entire directory. That’s neat! Usage Examples Embedding a text file in a string //go:embed version.txt var version string Embedding a binary file //go:embed product-catalog.pdf var catalog []byte Embedding a directory filesystem //go:embed template/* var templateFS fs....

December 18, 2022

Active Directory userAccountControl flags

I was creating an Active Directory (AD) security auditing tool in Go and Python when I stumbled upon the UserAccountControl flags. This attribute can hold multiple statuses like ACCOUNTDISABLE, NORMAL_ACCOUNT, or DONT_EXPIRE_PASSWORD. It uses a bit-field; a bit-field is a group of bits with each bit representing a value. It is an efficient way of handling multiple statues of a record. A tool that helps identify the property flags. Since a bit-field can hold a range of values, I need a tool that can help me look up the value it represents....

December 2, 2022 · John Pili
Python batch file MD5 checksum generator and checker

Python batch file MD5 checksum generator and checker

I am backing-up a large number of files to another computer when this idea came to me to write a Python script that generate and validate batch MD5 checksum. Feel free to customize the script according to your needs.

March 2, 2022 · John Pili

Python rename files that begins with matching string

Do you want to rename a number of files that begins with a specific name or string? I wrote this small Python script that does that. Of course, you can also do this with Bash or Powershell. I hope somebody might find it useful. import os import sys from os import path parameters = sys.argv[1:] if len(parameters) == 0: print(f"usage: {sys.argv[0]} <startswith-string>") sys.exit(0) if len(parameters) > 0: for file in os....

February 27, 2022 · John Pili