April 13, 2020

Programming - enstars.info

Revisiting OCR and Bad Translations

With the updated games and new story, thought some hilarious translations might make the content more readable.

Spent some time remembering how I did anything. I have one gimp macro that resizes the screenshots for the display images. This expects the title slide to be the first slide. Also have to lpad the first ten images with 0s. Those get renamed 1_01.jpg and the uploaded to images/translations.

Using the same raw source, there are two other gimp macros. One to cut the right and top side of the image off. And then a second one to cut the left and bottom off. Unfortunately gimp doesn't let you do two crops in one macro. The star is still there and causing noise.

There is then the translate.js node script. My google API credit ran out but it let me make calls no problem, shouldn't cost more than $1.

Each time the script is run, need to update the source images, destination name, and how many slides per chapter. This then spits out the JSON.

I should break the script into two, one with translate and one without to be more useful to others.

Got chapter 3 all set up though, only 127 more to go of the (so far) released chapters. At least the first event is only 9 and scout only 8!

Time Spent: 2 hours

March 26, 2020

Programming - DO Server

Cleaning Up syslog

After dealing with rouge logs filling up my server's space, let's clean up syslog.

Starting Fresh

I wanted to clean out what was in there and watch new stuff coming in as I turned off extra logging. I truncated the file with:

truncate -s 0 syslog

Stopping certbot from renewing old domains

I had two domains that were expired and removed from nginx, but I never removed them from certbot.

certbot certificates
lists all the certificates certbot is running. Then to delete a specific one:

certbot delete --cert-name example.xom

Stopping ufw from logging in syslog

It already has it's own log, it doesn't need to be in here too! Go to:

The last line is commented out, uncomment it. This will stop logging in syslog. Then restart the rsyslog service:
service rsyslog restart

Time Spent: 1 hours 23 minutes

February 26, 2020

Programming - DO Server

Moving vaulters to DO

This has been on my to do list for a while but I started getting failing lets encrypt errors and I couldn't manually regen the certificate. Googling the errors shows that you need to upgrade the underlaying versions of things so good enough reason to actually move this.


  1. Get new Wordpress on DO
  2. Set up test url
  3. Copy over database and files
  4. Copy over plugins
  5. When parity is there, change DNS
  6. Finally delete the old site!

Time Spent: 6 minutes

January 19, 2020

Programming - DO Server

Server Maintenance


sudo apt-get update && sudo apt-get dist-upgrade
on both droplets, both completed happily.

Time Spent: 25 minutes

December 20, 2019

Programming - DO Server

Fixing mailgun forwarding

Thought I had set this up correctly but then gmail rejected my test email 2 days later.

Mailgun settings: Need to not use the mg. prefix
All of the other ones have it so not sure what I did there to make it work but this was a quick fix

DO Network: Put in the relevant Mailgun DNS

Mailgun Receiving Routes: need to set one up to forward the email address just set up to gmail

Optional: Sending from the address at gmail: this is where the SMTP settings come into play

Time Spent: 1 hours 53 minutes

December 3, 2019

Programming - DO Server

WordPress Shenanigans 5.6 to 7.2

This isn't technically on DO but my last website on nearlyfreespeech.

Looking at vaulters, it's TLS had expired. It had been warning me nightly but I thought the issue was on nearlyfreespeech's end. I first tried switching servers as vaulters was on an deprecated one. This didn't fix it and also killed PHP 5.6. I went to switch back but the oldest server didn't have 5.6.

To fix the TLS, I went into the CLI and just re-ran the Let's Encyrpt certificate generation. That worked and the TLS was fixed within ~30 seconds.

Now to fix the PHP version issue. The main page would load but the login page had lot's of PHP errors. I had never upgraded the site as the upgrader would always error out on me.

I downloaded a new version of wordpress on CLI and put it in a folder new. I figured I could copy over the site into /new and then switch it over to the live site once it was working. Wordpress installed into /new/wordpress so I was copying the files from /wordpress up into /new. Instead I copied into / , overwriting the original files. D:

Little did I know, this is exactly what I needed to do! It fixed the PHP errors and the login page loaded! I logged in and the menu was chaos but otherwise looked okay. I tried to redo the upgrade to grab the missing files in the Wordpress UI but I kept getting the error. I then tried it from the command line and it told me I was already up to date. Knowing some files were missing, I renamed wp-config folder and copied over everything from /new. That didn't fix the menu. I then did the same steps for wp-includes, and this fixed it!

It does look like all the installed plugins got disabled and the theme lost it's custom options though.

Time Spent: 1 hours 18 minutes

November 11, 2019

Programming - DO Server

everythingelse is being really cachey

This has been going on since at least June. PHP needs to be restarted to get any changes to show up. Database stuff is fine. Wordpress sites have a lot of issues. enstars sever does not have this issue

Some how I had set opcache.validate_timestamps=0 in /etc/php/7.1/fpm/php.ini. I commented that back out to match enstars and actually got an error message on Wordpress!

Next steps:

Time Spent: 3 hours 34 minutes

October 17, 2019

Programming - Local Enviornment

Replicating Macbook's Vagrant Enviornment on Pancake (Window's Box)

It looks like I started doing this sometime in the past. The Homestead repo is there as well as the development domains in the hosts file. Not working when I try vagrant up though

Time Spent: 7 minutes

September 8, 2019

Programming - Weather Station

Weather Station Working!!!!

Woo got it working today and feeding data to this page!

Using the Huzzah and not the Arduino at all

Getting temp, humidity, and pressure

Anemometer needs a separate setup as it needs a 9V Vin and outputs up to 2V analog which Huzzah cannot handle

Time Spent: 10 hours 27 minutes

September 7, 2019

Programming - Weather Station

Setting up Https

My original setup was trying to reach this website's endpoint which is over https.

I tried to create some crazy work between but was encouraged to just do it the right way

The https library for the huzzah? wasn't bad at all and I was able to get it working.

[flesh this out]

Hunting down a https library

Pulling the needed code out of a more complicated example

Figuring out the sha


[add code here]

Time Spent: 2 hours

August 21, 2019

Programming - Weather Station

Create Endpoint to Add Data To Database

Built a quick GET endpoint to put data into the database from a URL with the parameters:

Time Spent: 20 minutes

July 30, 2019

Programming - Weather Station

Test Program on the Adafruit HUZZAH ESP8266 breakout

Following this tutorial https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout/using-arduino-ide

I got the blinking light program to work but only after I pulled the USB out of the computer. I tried the same approach with the wifi test and there is no result in the serial monitor.

Time Spent: 1 hours 57 minutes

May 6, 2019

Programming - Weekly Log

2019 Week 19

Monday 2019-05-06


Time Spent: 6 days

April 22, 2019

Programming - Weekly Log

Week 17 2019

Time Spent: 7 days

April 1, 2019

Programming - Weekly Log

2019 Week 14




Time Spent: 6 days

March 25, 2019

Programming - Weekly Log

2019 Week 13 - March 25 to March 31




Time Spent: 6 days

March 14, 2019

Programming - enstars.info

Laravel error email stopped working

OK SO, it was using env() to read the email from the .env file BUT this doesn't work when things are cached which usually happens on production

SO I created a new config file enstars.php and created a mail address in there that reads from the .env file, this way even the cached ones know it

it is sending the emails out i see them in mailgun but only one has shown up in my mailbox so far??? Maybe this is some gmail rate limiting thing? cause one worked the next day

Time Spent: 1 days 4 hours 40 minutes

February 21, 2019

Programming - Local Enviornment

phpmyadmin just says "No input file specified."

I don't think I did anything so why is this showing this.

I did break it when I

 rm -rf *
d my home directory. phpMyAdmin was living in the Code directory I deleted. I redownloaded it and followed the steps here: https://stackoverflow.com/questions/23788096/how-to-setup-phpmyadmin-on-a-laravel-homestead-box but it is not working still.

Time Spent: 1 hours 9 minutes

August 10, 2018

Programming - ccmakesthings.com

Setting up a LEMP Digital Ocean Droplet

Create new Droplet

Log into new Droplet for initial setup


Time Spent: 3 months 26 days 11 hours 46 minutes

November 19, 2018

Programming - Weekly Log

2018 Week 47 - November 19 to November 25



Time Spent: 6 days 23 hours 59 minutes

November 20, 2018

Programming - Enstars Bad Translations

Status Update

I have a node js script (that isn't up to date on github) that is ripping text out of screenshots, sending them to google translate API, and then creating a JSON file

To DO:

Time Spent:

November 20, 2018

Programming - figurerant.com

Status Update

Current goal of getting all past orders into a database. Detoured in adding goods and updating Laravel versions.

Time Spent: 1 minutes

November 12, 2018

Programming - Weekly Log

2018 Week 46 - November 12 to November 18


Time Spent: 6 days 11 hours

October 5, 2018

Programming - ccmakesthings.com

Moving WordCount UI

I finally moved the wordcount UI off of my personal site, that has been on my todo list FOREVER!

Time Spent: 32 minutes

October 1, 2018

Programming - DO Server

ccmakesthings has been moved!


And it's so much faster!

Time Spent: 3 days 10 hours 19 minutes

August 6, 2018

Programming - Weekly Log

2018 Week 32 - August 6 to August 12


Time Spent: 6 days

July 23, 2018

Programming - Weekly Log

2018 Week 30 - July 23 to July 29

ccmake 2018-07-29

Time Spent: 6 days

July 16, 2018

Programming - Weekly Log

2018 Week 29 - July 16 to July 22



Time Spent: 6 days

May 31, 2018

Programming - enstars.info

Pulling text out of story screen shots

I looked into this project last night, and finally got a working concept tonight!

Steps of mostly failure:

  1. Look for a way to pull text from images in PHP
  2. Find stack overflow mentioning Tessarect OCR https://stackoverflow.com/questions/2024238/read-text-from-an-image-with-php
  3. Go to wrapper mentioned https://github.com/thiagoalessio/tesseract-ocr-for-php
  4. Not understanding how it worked at all, I added it to my Laravel project through composer, but that didn't work.
  5. I then downloaded it on my mac through homebrew, this took a long time
  6. Decided to move this process to my windows box with more power
  7. Now late Thursday night
  8. Install Chocolatey package manager for windows through power shell
  9. Install the recommended windows package for tesseract
  10. Try to boot up my local xampp install, its completey broken.
  11. Abandon PHP, look for node package.
  12. There is one! http://tesseract.projectnaptha.com/
  13. Create a new project folder and install it
  14. Can't remember how to create projects from scratch in node, eventually remember how to run just the file name.
  15. Download example image, run test code, ERROR! Eng not found.
  16. Google around, no luck, just look through recent github issues and bingo! https://github.com/naptha/tesseract.js/issues/194
  17. Add in missing file
  18. rerun AND IT READS ENGLISH!!!
  19. Okay lets try Japanese, change language to Jpn, get language file
  20. Run and its completely garbled
  21. Move to browser as ghetto windows node shell probably can't handle Japanese font
  22. Some success but mostly garbled result!
  23. Crop picture so it's just the text
  24. Rerun - IT WORKS O M G

I can't believe I got it working! It was probably 3 hours of messing around over two nights, switching to JavaScript was the solution all along!

Next step is to start automating things, image cropping, file running, and then saving the text!

Time Spent: 2 hours 16 minutes

May 24, 2018

Programming - Status


Time Spent: 5 minutes

May 4, 2018

Programming - Errors

A non-numeric value encountered


$userteam->da = '';

$userteam->da + $userteam->da_2 + $userteam->da_3;


$userteam->da = 0;
$userteam->da + $userteam->da_2 + $userteam->da_3;

Time Spent: 3 minutes

May 4, 2018

Programming - Errors

[] operator not supported for strings

After my week of broken environments, I get enstars back up and boom this error.

The PHP version of the live version is 5.6 while the new dev environment is 7.2

Old code:

$allcards = '';
 $allcards[] = $card;

Fixed Code

 $allcards = [];
 $allcards[] = $card;


Time Spent: 4 minutes

May 4, 2018

Programming - ccmakesthings.com

Upgrading PHP to 7.2

It was 7.1 so 7.2 upgrade seems to have caused no issues! Excellent!

Time Spent: 2 minutes

April 16, 2018

Programming - Weekly Log

2018 Week 16 - April 16 to April 22



Time Spent: 6 days

April 9, 2018

Programming - Weekly Log

2018 Week 15 - April 9 to April 15




Time Spent: 6 days 12 minutes

October 11, 2017

Programming - London Trip Scrapbook

Writing Up My Travel Journal

When I was going through my closet for moving I found my shoebox full of London things I had kept. I had always wanted to make a scrapbook with the things but I was terrible at finishing scrapbooks and then you had to actually physically hold the scrapbook to look at it so why not create a digital one!

I have not figured out where this project will live or how exactly I will do it but my first step is writing up my journal I kept of my London and Paris trip in 2003. I'm five pages in so far and it has involved a lot of wandering and being lost. I want to figure out the path we took and take pictures of all the random stuff I have saved, in the end creating some fun scrollytelling/data story webpage

Time Spent: 17 minutes

May 19, 2017

Programming - Travel Site


I downloaded a CRUD template and was using that to build out the site. It's been so long though should probably just remake the same pattern I've been using.

Time Spent: 1 hours

October 3, 2017

Programming - General

Macbook Dependant

My Macbook's keyboard deicded to all the way break on Tuesday night and I realized just HOW much time I spent on it. Working on projects, writing, reading, wasting reddit time, all on the Macbook! Even when I took breaks from my phone in Japan and NY I STILL had the Macbook there.

It's still mostly useable with an external keyboard and wireless mouse but I'm about to not have it at all for two days, What will I do???? Can I handle it???? I should be able to, being so depedant on one object I can break easily is not good.