By marcom on Sunday, August 18, 2024
Photo by Pankaj Patel on Unsplash

Git allows you to include other repositories for your project as a submodule, however, I've encountered an errors. To remove them cleanly, follow these steps below.

Tags
By marcom on Monday, December 18, 2023
round assorted-color plastic cases

Freeing up storage space is a constant battle whether it is on your local computer or on your servers. To list directories and their file sizes, and then sorting them from the largest to smallest, makes life easier by using the following command:

du -sh -- */ | sort -rh
By marcom on Friday, December 22, 2023
Library Database

SQL files can be huge in sizes to load onto an editor in order to fix queries that is preventing it to be imported properly. Instead of loading onto an editor, you can simply execute a find a replace using the find app.

find . -type f -name database.sql -exec sed -i '' s/[text-to-find]/[text-to-replace]/g {} +
By marcom on Saturday, September 5, 2020
Copy files with rsync in Linux

Rsync (remote sync) is a linux utility to synchronize local and remote files and directories, mainly used in terminal.

I use this mainly in downloading/uploading files and directories from and to remote servers or even local files. I use rsync as well with shell scripts for backups that are ran automatically daily using the crontab utility.

By marcom on Tuesday, October 27, 2020
Macbook Coffee @danielcgold

Part of administering web servers is looking through log files for clues whenever you come across issues with your web server or web applications. The logs most often will tell you exactly what went wrong. However, log files can be separated into multiple files and compressed to save space.

To search for a particular text through multiple files easily, use the following command:

find . -name "*.gz" | xargs -n 1 grep -H "[text to search]"

Or if the log files are compressed with gzip, use the following command:

Tags
By marcom on Saturday, December 23, 2023
Shanghai interchange
SSLProxyEngine on
ProxyPreserveHost On
<Location />
	ProxyPass https://[IP]/
	ProxyPassReverse https://[IP]/
</Location>

 

By marcom on Wednesday, December 13, 2023
Tekton Socket Program

Trying to run WordPress in my XAMPP environment shows this error.

Tags
By marcom on Saturday, June 17, 2023
Towfiqu barbhuiya password image

How do passwords work on the web?

When you create an account on a website, you typically need to choose a password, which is can be a word or words, or a series alphanumeric or special characters.

Websites stores a representation of your password, which is called a hash, rather than storing the actual password in plain text. This is done to protect your password in case the website's database is compromised.

By marcom on Saturday, May 13, 2023
DALL-E developer in his desk with macos terminal decoding certificate files

A DER-encoded certificate can be transformed into an ASCII (Base64) encoded certificate using OpenSSL. A DER-encoded certificate cannot be read as plain text (unlike a PEM-encoded certificate). DER-encoded certificates typically have the file extensions.DER,.CRT, or.CER.

In the event that a PEM-encoded certificate also has the.CRT or.CER file extension, you can simply copy the file to a new name using the.PEM extension:

$ cp hostname.cer and hostname.pem

Use OpenSSL to convert a DER-encoded certificate to PEM:

By marcom on Tuesday, April 18, 2023
Home-Office Work Station

After setting up a local web development environment with XAMPP for MacOS, you should still secure your installation, even if you're the only one working on your computer.

By marcom on Wednesday, April 5, 2023
Glasses in front of monitor

I use Sequel Pro for administering databases on local development environment.

I encountered an error where the database import would reach half way and the importing process prompts an error  about the encoding being incorrect. Although the database file was encoded in UTF-8 and it seems that the autodetect failed and does not work.

There seems to be an encoding mismatch when exporting a MySQL database from a Linux environment and then imported into Sequel Pro on Mac.

By marcom on Sunday, March 26, 2023
Hebrews 11:6 Good News Bible

Faith should not only be upheld by true servants of God but also something they must strive to enhance.  Read more here: https://www.pasugo.com.ph/faith-an-essential-virtue-in-ones-relationship-with-god