Category: General

  • Simplifying My Life

    I have uninstalled saldivar.co‘s WordPress instance and have 301 redirected to jorge.saldivar.co‘s domain. At first, the purpose of the two sites was to separate concerns, web design business and personal use. However, that’s no longer necessary since I’ve been employed full-time.

    Simplifying My Life
  • PDF to HTML

    WSL, Ubuntu 20.05, command line, for “PDF to HTML.” Step by step.

    Here are the short instructions to convert a PDF to HTML using WSL with Ubuntu 20.04:

    1. Install WSL with Ubuntu 20.04.
    2. Launch the Ubuntu terminal.
    3. Update Ubuntu: sudo apt update && sudo apt upgrade -y.
    4. Install Poppler: sudo apt install -y poppler-utils.
    5. Convert PDF to HTML using:
      pdftohtml -s <input_file>.pdf <output_file>.html
    6. Access the converted HTML file in the same directory.

    That’s it!

    PDF to HTML
  • News page added back to website

    The News page has been added back to the website. Some news sources were removed as they often produced RSS errors or the headlines were simply too bombastic or misleading by my standards.

    On the tech side of it, I did have to add some JavaScript to the native WordPress RSS widgets, so that I links opened in a new tab, etc., below is the code snippet:

    <script>
        // Open link in new tab
        let link = document.querySelectorAll('.wp-block-rss__item a')
        link.forEach((e) => {
            e.setAttribute("target", "_blank")
        })
    
        // Add inline style to the <ul>
        let news_list = document.querySelectorAll("ul.wp-block-rss")
        news_list.forEach((e) => {
            e.setAttribute("style", "list-style-type:none; margin: 1rem auto;");
        })
    
        // Make the title inline
        let wp_block_rss_item_title = document.querySelectorAll('div.wp-block-rss__item-title')
        wp_block_rss_item_title.forEach((e) => {
            e.setAttribute("style", "display:inline-block!important;");
        })
    
        // Style the publish date
        let wp_block_rss_item_publish_date = document.querySelectorAll('.wp-block-rss__item-publish-date')
        wp_block_rss_item_publish_date.forEach((e) => {
            e.setAttribute("style", "display:inline-block!important; font-weight:bold; margin:0 8px;")
        })
    </script>
    News page added back to website
  • MacOS XAMPP, setup example.com website

    To set up a website with XAMPP on macOS and create a virtual host for it, you can follow these steps:

    1. Open the Terminal application on your Mac.
    2. Navigate to the XAMPP directory by typing the following command:
      cd /Applications/XAMPP
    3. Once you are in the XAMPP directory, navigate to the Apache configuration folder by typing the following command:
      cd etc/apache2
    4. In the Apache configuration folder, you will find a file called httpd.conf. Open this file in a text editor such as nano or vim by typing the following command:
      sudo nano httpd.conf
    5. In the httpd.conf file, locate the following line:
      # Virtual hosts
      # Include etc/extra/httpd-vhosts.conf
    6. Remove the # at the beginning of the second line to uncomment it.
    7. Save and close the httpd.conf file.
    8. Navigate to the Apache extra configuration folder by typing the following command:
      cd extra
    9. In the extra folder, you will find a file called httpd-vhosts.conf. Open this file in a text editor by typing the following command:
      sudo nano httpd-vhosts.conf
    10. At the bottom of the file, add the following code to create a virtual host for your WordPress website:
      <VirtualHost *:80>
          DocumentRoot "/Applications/XAMPP/htdocs/example.com"
          ServerName example.com
          ServerAlias www.example.com
          ErrorLog "/Applications/XAMPP/logs/example.com-error_log"
          CustomLog "/Applications/XAMPP/logs/example.com-access_log" common
          <Directory "/Applications/XAMPP/htdocs/example.com">
              AllowOverride All
          </Directory>
      </VirtualHost>
    11. Replace “example.com” with your website’s domain name.
    12. Save and close the httpd-vhosts.conf file.
    13. Restart Apache by typing the following command:
      sudo /Applications/XAMPP/xamppfiles/bin/apachectl restart
    14. Download and install WordPress into the newly created directory (example.com in this example) by following the instructions on the WordPress website.
    15. Open your web browser and type in your website’s domain name (e.g. http://example.com) to access your WordPress website.
    MacOS XAMPP, setup example.com website
  • Example GitHub PHP Project

    As a former independent web developer, I had very little use for GitHub as my project base consisted of small business owners and their requirements mostly never got past having a WordPress website and business email setup.

    Today, using Git repos are vital for my workflow as I’ve been working with various teams to push web apps to live status. Now, I can’t picture not using Git repos for any project. After being a largely siloed developer, my work is now part of a very collaborative process.

    With that said, I’ve been working on a personal project, jsldvr/example.com, which is a PHP web app that is supposed to make developing a website as easy as possible for those that use cPanel or AWS. The app is more of an exercise in learning how to use GitHub, and building a secure PHP app from scratch.

    I don’t have a road map with this project. I simply want to have fun with it and learn as much as I can about collaborating and/or developing on GitHub.

    Example GitHub PHP Project
  • Could not reliably determine the server’s fully qualified domain name, using ::1.

    Preface:

    I’ve been using ChatGPT as a development tool as of late. Prior to searching for possible bug fixes, I’ll check to see if ChatGPT has an answer to what I would normally use as a query on Google or Bing. In this instance, I receive the following error after running service apache2 start.

    Me:

    AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using ::1. Set the ‘ServerName’ directive globally to suppress this message

    ChatGPT:

    This message is generated by the Apache web server and is indicating that the server is not configured with a fully qualified domain name (FQDN) for the current IP address.

    To resolve this issue, you can set the ServerName directive globally in the Apache configuration file to specify the FQDN of your server. This can be done by following these steps:

    1. Open the Apache configuration file for editing. This is typically located at /etc/apache2/apache2.conf or /etc/httpd/conf/httpd.conf.
    2. Search for the ServerName directive. If it is commented out (i.e., prefixed with a #), remove the # character to uncomment the line.
    3. If the ServerName directive does not exist, add it to the configuration file as follows:
    ServerName yourserver.example.com

    Replace yourserver.example.com with the FQDN of your server.

    1. Save the configuration file and restart the Apache service to apply the changes:
    sudo service apache2 restart
    

    After completing these steps, the message should no longer appear and the Apache web server should be able to determine the server’s FQDN.

    Result:

    The error did not repeat itself.

    Could not reliably determine the server’s fully qualified domain name, using ::1.
  • Build Your Own Website

    brown rock formation under white and blue cloudy sky

    Establishing your own website or blog is not just a statement of independence, but a strategic move to ensure your voice is heard, unhindered by the whims of social media giants.

    No matter what social media platform dominates the market, or who owns your favorite platform, the best method for anyone to get their message out is via their own website or blog. It’s never been easier to purchase a domain name, setup a web hosting service, and install a CMS like WordPress. After some configuration, the site is ready to go live.

    Eventually, I may post an easy-to-use guide on how to launch your own personal website. But in the meantime, here’s a link to WordPress hosting suggestions by the folks at WordPress. Don’t wait, blog today!

    Please note: this suggestion works well for individuals that need to get a message out, and not businesses. For that, I would recommend hiring a good cloud developer with a strong sense of cyber security.

    Build Your Own Website
  • Current Status

    Since October of 2021, I’ve been working with a great start up web team. With that said, I’ve scaled back taking in new clients. If you’re interested in working with me, please contact the person that referred you to make an introduction. Thanks and God bless!