Category: General

  • RGVWEBPRO gets a facelift and a new purpose

    RGVWEBPRO gets a facelift and a new purpose

    Exciting times. RGVWEBPRO will return to the world of open source. It will no longer provide web hosting or sell domain names.

  • You ‘memba?

    You ‘memba?

    Boy, time flies…

  • Solar Eclipse 2023

    Solar Eclipse 2023

    One of the real cool effects of a solar eclipse is when the partially blocked sun light shines through branches leaving this crescent light pattern. It’s the same concept as using a Pinhole Projector, except it’s an array. Very cool, indeed.

  • git@github.com: Permission denied (publickey)

    git@github.com: Permission denied (publickey)

    Issue:

    ubuntu@rgvwebpro:~$ git push
    git@github.com: Permission denied (publickey).
    fatal: Could not read from remote repository.
    
    Please make sure you have the correct access rights
    and the repository exists.
    

    Resolution:

    The error message you’re seeing is typically related to SSH key authentication issues when trying to communicate with a GitHub repository. The steps to resolve this error and prevent it from occurring in the future are as follows:

    1. Check SSH Keys: Make sure that you have an SSH key generated and added to your GitHub account.
      • To check if you have an SSH key, you can run the following command: ls -al ~/.ssh
      • If you don’t see any SSH keys, or if you want to create a new one, you can generate an SSH key using the command: ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
    2. Add SSH Key to GitHub:
      • Run cat ~/.ssh/id_rsa.pub to display your public SSH key.
      • Copy the displayed key.
      • Go to your GitHub account settings, navigate to the SSH and GPG keys section, click on “New SSH key”, paste your public key into the text field, and save it.
    3. Check SSH Agent:
      • Ensure that the ssh-agent is running by executing
        eval "$(ssh-agent -s)".
      • Add your private SSH key to the ssh-agent using the command:
        ssh-add ~/.ssh/id_rsa
    4. Test the Connection:
      • Test your SSH connection to GitHub using the following command: ssh -T git@github.com
      • You should receive a message indicating that you’ve successfully authenticated, but that GitHub does not provide shell access.
    5. Update Remote URL (Optional):
      • If your repository is still configured to use HTTPS, you might want to switch to SSH. You can check the remote URL using: git remote -v
      • If needed, change the remote URL to use the SSH protocol: git remote set-url origin git@github.com:username/repo.git
    6. Retry the Push:
      • Now try pushing to GitHub again: git push
    7. Check Repository Permissions:
      • Ensure that your GitHub account has the necessary permissions to access the repository you’re trying to push to.

    By following these steps, you should be able to resolve the “Permission denied (publickey)” error when pushing to GitHub.

  • Enhancing my VS Code theme

    Enhancing my VS Code theme

    Vibing with this Atom One Dark theme.

    What’s your theme of choice?

  • Enhancing Your macOS Terminal Workflow: Creating an Alias for ‘ll’ to ‘ls -als’

    Enhancing Your macOS Terminal Workflow: Creating an Alias for ‘ll’ to ‘ls -als’

    To list files and directories with detailed information using the ll command in the macOS terminal, you can create an alias for ls -als. Here’s how you can do it:

    1. Open your terminal.

    2. Run the following command to open your shell profile configuration file in a text editor. This file is usually .bashrc or .bash_profile.

    nano ~/.bashrc
    
    1. Add the following line to create an alias for ll to execute ls -als.
    alias ll='ls -als'
    
    1. Save and exit the text editor by pressing Ctrl + O to write the changes and then Enter, followed by Ctrl + X to exit.

    2. Source your profile to apply the changes without having to restart the terminal.

    source ~/.bashrc
    

    Now you can use the ll command to list files and directories with detailed information, just like you would with ls -als. The alias will make your terminal experience more efficient and convenient.

    Possible Issue: If the source has to be updated after each new terminal window.

    Run echo $SHELL to check if bash or zsh.

    If you’re using the zsh shell, the steps to create an alias for ll will be slightly different than for the bash shell. Here’s what you should do:

    1. Open Configuration File: Open your zsh configuration file, which is usually ~/.zshrc, in a text editor. You can do this using the following command:

      nano ~/.zshrc
      
    2. Add Alias: Add the alias for ll by including the following line in your ~/.zshrc file:

      alias ll='ls -als'
      
    3. Save and Exit: Save the changes and exit the text editor (Nano) by pressing Ctrl + O to write changes, then Enter, and Ctrl + X to exit.

    4. Apply Changes: To apply the changes to your current terminal session, run:

      source ~/.zshrc
      

    Now, whenever you open a new terminal session, the ll command should automatically be aliased to ls -als without needing to run source ~/.zshrc each time.

    Title and body written by ChatGPT.

  • Simplifying My Life

    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.

  • PDF to HTML

    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!

  • News page added back to website

    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>
  • MacOS XAMPP, setup example.com 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.