Bash: Clean Movie Folders

Here is another script to help clean up movie folders.  Until recently, I preferred having all of my movies in the same directory.  After switching to Plex Media Server, I soon realized that Plex downloads fanart and other related movie files.  The issue is that all of these additional files were also in the main movie directory.  The following script went through and created a sub-directory for each movie name and then the second half moved the files into their respective folder.

for i in `find . -maxdepth 1 -type f -printf ‘%f\n’ |sed “s/^\(.*\)\..*$/\1/”`; do mkdir $i; done
for i in `find . -maxdepth 1 -type f -printf ‘%f\n’ |sed “s/^\(.*\)\..*$/\1/”`; do mv $i* $i; done

Settlers of Catan Board

Here is one of the newest projects.  I’ve been wanting to make something new and I’ve also wanted to teach my kids how to play Settlers of Catan.  After looking at some of the custom boards, I decided to give it a shot and make my own.

Using ddclient to Update DDNS on Google Domains

‘ddclient’ is a simple DDNS callback program developed in perl.   It reports the IP address to the DDNS server to automatically update your machines IP address.  One of the great features is that it’s compatible with Google Domains.  In order to get it working, you need  to install it from your distros package manager. (pacman, apt-get, emerge etc.)

Once installed, locate your ddclient.conf (most likely in /etc/ddclient/) and edit it with the following block:

<span style="font-family: 'courier new', courier, monospace;">daemon=300
syslog=yes
pid=/var/run/ddclient.pid
ssl=yes
 
use=web, web=https://domains.google.com/checkip
protocol=dyndns2
server=domains.google.com
login=LOGIN-FROM-GOOGLE
password=PASSWORD-FROM-GOOGLE
WWW.MYWEB.SITE</span>

For the login and password, when you log into your domains.google.com account and navigate your Synthetic records and get your username and password credentials from clicking the view option. Make sure that your website matches and the credentials are case sensitive.

Once you have updated ddclient.conf, save it, and start the system service:

sudo systemctl start ddclient.service
sudo systemctl enable ddclient.service

or for others:

sudo service ddclient start
sudo update-rc.d ddclient enable

When complete, it takes about 1-2 minutes for everything to update and then your DDNS should be working and pointing your IP address to your domain name.

Obtaining SSL Encryption Certificates for Apache on Arch Linux

This has been an issue for me for quite some time. I have been trying to get SSL working and get valid certificates so that I could secure a few things and offer better security. Additionally, these days, having secure http is an added benefit. Most web-based server functions prefer the use of https over http for the extra security as well.

Here is how I got SSL and the proper encryption installed on Arch Linux with Apache.

First, Install what you need (assuming that you already have [LAMP](https://wiki.archlinux.org/index.php/Apache_HTTP_Server) stack).

yaourt -S certbot certbot-apache acme-tiny letsencrypt-cli openssl

Next, you need to obtain the certificates. Also, I port forwarded 80 and 443 through the router to the server. This would be a good time to make sure that port forward is good or else this won’t work properly.

certbot certonly --email your.email@address.com --webroot -w /srv/http/site1/ -d www.inject.run,inject.run

If you have received the congratulations message, then you should have certificates in the designated folder. (Mine were located in /etc/letsencrypt/live/inject.run/fullchain.pem.)

Now we have to activate/use the certificates through Apache.

Edit /etc/httpd/conf/httpd.conf and uncomment the following (I use nano and ctrl+w to search):

<span style="font-family: 'courier new', courier, monospace;">LoadModule ssl_module modules/mod_ssl.so
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
Include conf/extra/httpd-ssl.conf</span>

and, while you’re in httpd.conf, search for Listen 80 and add Listen 443 right below that line.

Now, this might seem like a duplication of effort, but it was the only way I got this to work:

In /etc/httpd/conf/extra/httpd-ssl.conf, find the Virtual Host Context section, and add your VirtualHost server information as follows:

DocumentRoot "/srv/http/inject.run"
ServerName inject.run:443
ServerAdmin YOUR.EMAIL@ADDRESS.COM
ErrorLog "/var/log/httpd/error_log"
TransferLog "/var/log/httpd/access_log"
SSLEngine on
SSLCertificateFile "/etc/letsencrypt/live/inject.run/fullchain.pem"
SSLCertificateKeyFile "/etc/letsencrypt/live/inject.run/privkey.pem"
#SSLCertificateChainFile
"/etc/letsencrypt/live/inject.run/chain.pem"
#SSLCACertificatePath "/etc/httpd/conf/ssl.crt"
#SSLCACertificateFile "/etc/httpd/conf/ssl.crt/ca-bundle.crt"

Note, the only two files you have to reference from your certificates are fullchain and privkey.

And, the last thing before you restart all of your services is to add a separate VirtualServer in your httpd-vhosts.conf file. Edit /etc/httpd/conf/extra/httpd-vhost.conf and add a second VirtualHost for the same website but with *:443 instead of *:80. Additionally, you are going to need to add your certificate information as well. Look below as an example:

     ServerName www.inject.run
     OTHER OPTIONS FOR VHOST HERE IF NEEDED
 
 
 
     ServerName www.inject.run
     OTHER OPTIONS FOR VHOST HERE IF NEEDED
 
     SSLEngine on
     SSLCertificateFile "/etc/letsencrypt/live/inject.run/fullchain.pem"
     SSLCertificateKeyFile "/etc/letsencrypt/live/inject.run/privkey.pem"

Notice I added the SSL stuff in the second VirtualHost entry.

Now, if you chose, you can remove everything from the non-encrypted VirtualHost and add the following line below the ServerName to redirect all traffic to secure connections.

Redirect / https://www.inject.run/

Hopefully, this helps get your SSL encryption working.

My Salsa Recipe

I have been working on trying to get a good salsa recipe for quite some time now. I think I’ve finally get the recipe down that I like. This recipe is inspired by all of the other “Chili’s Salsa” copycat recipes out there. The results may vary from batch to batch based on the size of the yellow onion.

Ingredients:

28oz can of whole peels tomatoes (I use Hunt’s with no salt or sugar)
1 whole yellow onion
1-2 cup(s) of pickled jalapenos (flavor and spicy)
2 tsp of crushed red peppers
1 tsp minced garlic
1/2 tsp cumin (recent addition)

1/2 tsp garlic salt
1/2 tsp sugar
1/2 tsp salt
1/2 tsp cayenne pepper
generous amount of lime juice (half to whole lime)

Add all of this together in the blender and let it rip for about a minute. The consistency should be very runny, not chunky at all. Best of all, it should look very similar to Chili’s salsa.

Scrap Wood Planters

Boredom + Scrap Wood = Planters

I decided to create some simple planters and grow a few veggies for around the house. I’ve never really grown plants before, so I am not sure how long these little things are going to stay alive, but so far, things have been going good. I had to thin the herd a little and make room for others to grow because I went a little crazy with the seeds. Things seem to be coming along pretty good though and all of the plants finally seem to start growing faster. We shall see towards the end of this season… hopefully there will be something to show for.

Custom 3D Printer Case

Here are some of the latest photos of the custom case that I made for the Smoothieboard. I didn’t like the old mounted system, so I decided to gut the entire case and create a new one. One of my buddies cut the aluminum rails (as he wanted to create a case for his CNC Mill’s computer as well), and I cut the plexiglass on the CNC table. The result wasn’t too bad.

Additionally, I printed a fan holder for the top of the case.

Here is the old case/holder for the Smoothie Board.

here is the machine doing some cuts

and.. here is the new case.

Mocha CFW on Wii U

After some time, hacking the Wii U is finally possible. When I owned the original Wii with the old hacks on it, I could back up my games and play the copies from a hard drive. Now, you can do the same thing with the Wii U. Although I typically provide a walk through, I feel like this one isn’t going anywhere for a while. Follow the guide provided below for the steps on how to install Mocha CFW on the Wii U.

https://github.com/FlimFlam69/WiiUTutorial/wiki

Additionally, this next link is worth reading for the FunKiiU software.

https://github.com/llakssz/FunKiiU

https://goo.gl/v3bzzm

Custom Router Table

I just finished building my router table insert for combined workbench. The process was fairly simple. I used a jigsaw to cut the insert hole, and then used a router to create an inset pocket on the top to hold the Bench Dog router plate. To make sure that it was flush, I used the plate to set the depth of the router bit before cutting it out. The fence is still on the way, and I will need to create a pocket for the router bit. I decided to go with extruded aluminum from [8020.net](https://8020.net/shop/2040-s.html#). I will stack two of them and bore a hole through them so that I can mount that to the table surface and pivot on the right side. This will allow me to secure it from the other side, then open and close the fence as needed for cuts.