Category: General

This category is more for general topics and announcements.

Hello, and Welcome To My Blog!

Photo of Grayson Peddie

Hello! My name is Grayson Peddie and this is my first time writing my blog from scratch instead of using WordPress. I was born in Panama City and raised in Tallahassee, Florida throughout my entire life. I am CompTIA A+, Network+, and Security+ certified and I love to get into career in Information Technology. I want to get my feet wet in a little bit of cybersecurity and a lot of network engineering. Not only that, I would also like to setup a homelab with a couple of servers for running OpenStack.

The reason why I wrote my own blog engine instead of using WordPress or any other content management systems is to challenge myself. My blog engine is designed to be written with security in mind. Plus, I want to keep the administration user interface separate from my main website. I do the same for MySQL by creating two databases: one for my main blog and one for administrative tasks. An administration panel (a web application) is designed to be private in my home network, so when I'm ready to publish my blog article, I can sync my blog database to my public website, which is what you are reading now.

My Website is Now Live!

After a couple of months of taking a break from working with my website, I've decided to go ahead and publish my blog to the Internet. As for which SSL certificate I'm going to go with, I'm planning on going with Let's Encrypt. Note that my hosting is paid for with my money, so no ads will show in my website.

Update as of September 20, 2020 at 1:07 PM EDT: I have Let's Encrypt installed and my blog is ready to go!

Speed Improvements For Mobile Users

The paragraph below is for people with eyesight and is not applicable for those who use screen readers such as Jaws, NVDA, or in a GNOME desktop running in Linux, Orca. However, if anyone with low vision are using Voiceover for iPhone or Talkback for Android, the reduced file size can be beneficial.

Today, I've been thinking about how fast the web page can load for desktop and mobile browsers. The reason why I want to optimize my website for mobile users is so I want to get the time it takes to load the content in under 2 seconds and even better, in just 1 second. For mobile users, instead of loading a header with a resolution of 1500 by 500, I reduced the resolution to 750 by 250 pixels. This results in reduced file size in order to cut down on how much data is transferred to a mobile device when using a cellular connection.

Plus, images below the browser's visible area of the screen won't load until you scroll down and read more content. This is called "lazy-loading." When a "lazy-loading" is set for images, your web browser only loads images that it needs to load and not load any images that are hidden from view. This results in faster loading times for anyone visiting my website.

Anyway, I hope my speed improvements can be of use for anyone who can use only a limited mount of data and for those who have a very slow connection to the Internet. Happy surfing!

My First Unscheduled Maintenance

In order to make some changes to my database, I needed to make an unscheduled maintenance for my website. I'm not expecting a lot of traffic to my blog. I need to add a description field in my administration panel for my website so that I can check to see if everything goes well in my end. I am new to MySQL replication, which allows me to automatically push data from my development MySQL server to my production server. If all goes well, my website should be up and running soon. Hopefully in less than an hour.

The reason why the description field is important is so when anyone searches my website from Google, I want the description of my site and the article to show up in search engines.

Update as of 11:46 PM EDT: I bought my website back online and everything did not go smoothly as planned. I have two databases in my development server and only one database in my production server. In my development server, I have a "reader" database and an "admin" database. The two databases are there for privilege separation, so in an event of a SQL attack, a criminal hacker can't cause damage to my production database and I do not want administrative functions such as writing a blog article in my production server. So, other than manually using mysqldump and pushing the SQL file to my production database, I am wondering if there some form of version control system for my production database... That way, I can commit changes from my administration panel and push changes to my production server's database.

Anyway, all is well, I hope...

Update as of 1:40 AM EDT: Okay, I'll have to push database changes the old fashion way by using mysqldump from my development server and pushing changes to my production server. Pushing changes to my production server will drop all the tables and recreate them with my changes I made from my development server and I only need to update the rows in the database table and nothing else.

Database Synchronization: From Development To Production Server

I am taking some time to write code for my blog that will synchronize my database from my development to production server. The way how it works is every time I write a new blog article, an article is stored in my development server. To push changes to my database that is stored in my production server, my administration panel simply connects to the database in my development server, gets the data from there, connects to my production server, and copy the data to the database. If I edit my post or delete the data stored in my development server, the changes I made can be manually pushed to the database in my production server.

This will take some time as writing code that synchronizes my development database with my production database can be tedious as I don't want to mess up my production server if something goes wrong. That's why I have a virtual machine setup for testing database synchronization before I begin to synchronize my development database with my production server. I asked my question over at Stack Overflow and provided my answer which describes how the process will work once it's done. I also talk about how I am using a solution that drops and recreates all the tables along with importing all the data into the database. While this is a quick-and-dirty solution, the use of mysqldump and mysql command for exporting and importing the database is inefficient once my blog gets larger and larger.