Category: Technology

  • A Typing Tip

    Random fact I wish I knew before: I went back to typing.com to practice typing numbers and actually watched the video I normally skip. If you want to know what finger to use to type a number, just count your fingers starting with your pinky finger on your left hand. Your pointer fingers count for…

  • List Comprehensions in Python 3

    10/21/21: This is old from when I was taking a Python course. I often forget how to write list comprehensions, so I decided to write a blog post about it. The basic syntax goes like this: If you want to manipulate it, you can do stuff like this:  

  • Run Caddy on Boot

    10/11/21: This article does not explain every step well but may be useful so I’m posting it. Add the following to the root crontab: screen -d -m bash /home/josh/caddystart Create a bash script that launches Caddy with your Caddyfile. Create a Caddyfile in same directory you put your script in: blog.joshmudge.com tls myemail@email.com root * /var/www/wordpress…

  • Running WordPress on Caddy – Solving my problems.

    To run wordpress on Caddy, you need a Caddyfile like this: www.yourdomian.com tls youremail@youremailhost.com root * /usr/local/www/wordpress php_fastcgi # Prevent malicious PHP uploads from running @uploads { path_regexp path /uploads\/(.*)\.php } rewrite @uploads / @wp-admin { path not ^\/wp-admin/* } rewrite @wp-admin {path}/index.php?{query} file_server Then you need to set your permissions right. sudo chown -R…

  • WordPress Sending You to a Login Page on Another Site?

    I was trying to setup this blog but I kept being sent to the login on another website that I setup. The link was hard-coded into my WordPress setup, I didn’t know what to do with that. If you are having the same problem and are running a Linux server, run: # Install WordPress CLI…

  • Linear Regression

    One of the projects in my Python 3 course on Codecademy was to calculate the linear regression of any given line in a set. This is my journey of doing just that, following their instructions. The goal, is to calculate the bounciness of different balls with the least error possible. Starting with y = m*x…

  • Nested Loops

    In an exercise I was working on, I wanted to raise a list of bases to a list of powers and return the result. I tried a complicated method with list comprehensions and regular for loops, but nested loops make this so much easier: exponents([2, 3, 4], [1, 2, 3]) returns:

  • Automatically Snooze Incoming Mail in Gmail

    I get emails every day for a friend’s project that I want to respond to at least 12 hours after I get them, to see if the user has any questions. I was thinking it would be nice if there was a feature for this in Gmail. There isn’t in Gmail itself, but I figured…

  • Set/Reset MySQL Root Password on MySQL 14.14

    I was trying to setup MySQL that I installed using sudo apt install MySql and couldn’t remember how to set the root password. I found many different instructions on how to stop MySQL, boot into safe mode and reset the root password. None of them worked. This did: sudo mysql_secure_installation You will see something like…