Building Dynamic Web Applications with Python

Posted on Fri 18 September 2020 in python • Tagged with python

If you are a full-stack developer, whether you like it or not, you are going to use Javascript. It's an incredible language that allows developers to create dynamic applications. The amount of Javascript you use is up to you. Javascript can be used to power an entire application or it …


Continue reading

Using Brave Browser flags in linux

Posted on Sun 23 August 2020 in dev-journal • Tagged with developer journal

The easiest solution to add flags to your Brave Browser startup is to use the brave AUR package. It has a brave-launcher script that will check for a .config/brave-flags.conf file. All you need to do is create and populate the .config/brave-flags.conf

Alternative if using the brave-bin …


Continue reading

Grub Boot repair

Posted on Wed 19 August 2020 in dev-journal • Tagged with developer journal, linux, grub

One of my servers had a failure over the weekend and caused some corruption of the boot loader. This is the first time I have experienced this with a setup built on LVM and LUKS, which provided a little extra complexity to solve the problem.

This time, the Ubuntu Boot …


Continue reading

Incremental UI improvements

Posted on Tue 04 August 2020 in dev-journal • Tagged with developer journal, conveyor

Small UI updates today

Added a card to show additional information:

info card

Just for convenience a link was added to get from the register screen to the login page.

Add link back to log in


Vim regex grouping

Posted on Tue 28 July 2020 in dev-journal • Tagged with developer journal, vim

Wrote a regex in vim today that used a grouping in the find and replace. Needed to update 936 instances..

From a statement that calls a custom module function {% if entry.getEnableVal('conveyorDevToggle') == 1 to be a simple statement.. {% if entry.conveyorDevToggle %}

This is the regex used: :%s/\ventry.getEnableVal …


Continue reading

Overhauling the registration page

Posted on Fri 24 July 2020 in conveyor • Tagged with developer journal, conveyor

In this iteration a few small changes are going to be made. Here is the current state of the Conveyor registration page:

2020-07-23-210006_1455x812.png

Here it is after the following changes:

  • The width of the form imports are too long
  • Add a referral code input
  • Make the submit button smaller
  • Right align …

Continue reading

Recaptcha Uncaught (in promise) null error with Flask

Posted on Fri 24 July 2020 in dev-journal • Tagged with developer journal, recaptcha, flask-wtf

When trying to implement Recaptcha2 Invisible with Flask-WTF I ran into the following error:

Uncaught (in promise) null

This seemed to be a pretty obscure problem as I could not get any additional information from the application about what was going wrong. What finally got me to the solution was …


Continue reading

The newgrp command

Posted on Mon 20 July 2020 in dev-journal • Tagged with newgrp, linux

newgrp is a convienient command I ran across today. You can run this command after you add your user to a group. This allows you to continue without having to logout and log back in for the group changes to take effect.

Here is the man page:

 Manual page newgrp …

Continue reading

Developer Journal: 19 July 2020

Posted on Sun 19 July 2020 in dev-journal • Tagged with developer journal

Finished documentation for a client website. Remove database backups that are more than 30 days old

Otherwise a server maintenance day:

  • Cleaned internals of home server
  • Ran RAM test as I have had some crashes a couple times
  • Loosened the CPU heatsync screws a half turn each. There are reports …

Continue reading

Adding Matomo to Pelican Flex theme

Posted on Wed 15 July 2020 in dev-journal • Tagged with developer journal

After setting up an account with Matomo you can add the following to your peliconconf.py file.

# pelicanconf.py
MATOMO_SITE_ID = 2
MATOMO_URL = "ma.matomo.cloud"

Remove spaces from filenames

Posted on Wed 15 July 2020 in dev-journal • Tagged with developer journal

Here is a great little bash command to remove all of the spaces of a filename and replace them with an underscore for all files in the current directory.

for f in *\ *; do mv "$f" "${f// /_}"; done

Python Morsel Week One

Posted on Mon 13 July 2020 in morsels • Tagged with developer journal

In an attempt to improve my abilities with Python I am starting to do Python Morsels.

The problem statement:

I'd like you to write a function that accepts two lists-of-lists of numbers and returns one list-of-lists with each of the corresponding numbers in the two given lists-of-lists added together. It …


Continue reading

Changing struts on a 2005 Toyota Corolla

Posted on Sun 12 July 2020 in dev-journal • Tagged with corolla, toyota, vehicle

This also applies to 2003, 2005, 2006, 2007, and 2008 models.

With 152k miles it was finally starting to feel time to replace the suspension in The Rolla. Replacing the struts in a 2005 Corolla is a fairly easy task.
I was planning 4 hours just to replace the back …


Continue reading

Developer Journal: 09 July 2020

Posted on Thu 09 July 2020 in dev-journal • Tagged with developer journal

Spent some time today working with Github actions for the first time. I set up a workflow that allowed me to lint the repo and run the tests on push.

Of course, this meant running my tests for the first time in a different environment and there was 37 tests …


Continue reading

If you were granted a wish, what would it be?

Posted on Wed 08 July 2020 in dev-journal • Tagged with developer journal

Today I was filling out a survey for a product I signed up for Python Morsels to help continue my Python education and one of the questions was:

If you could wave a magic wand (written in Python) and I could grant a wish, what would suddenly be different for …


Continue reading

Paving the way for Python 3.8

Posted on Wed 08 July 2020 in conveyor • Tagged with flask, conveyor, migrations

Currently Conveyor will install Python 3.6 when you create a server as 3.6 is the version that is used with Ubuntu 18. However, it would be great to have the ability to install more recent versions of Python and be able to use different versions depending on the …


Continue reading

Adding a test for the new site button

Posted on Tue 07 July 2020 in conveyor • Tagged with flask, conveyor, testing

When refactoring the new flow for creating a site the + New Site button was removed so there was only one option to add a site. If you already have a site with Conveyor we need to make sure the add site button is available.

To start I have written two …


Continue reading

Open markdown links in a new tab

Posted on Tue 07 July 2020 in dev-journal • Tagged with developer journal, markdown

While this is not supported with all Markdown interpreters, the following will work with Pelican and many others. You can add {:target="_blank"} following the Markdown link.

[Conveyor](www.conveyor.dev){:target="_blank"}

Here is an example, this link will open in a new tab: Conveyor


Return all items from a Github resource from the API

Posted on Tue 07 July 2020 in dev-journal • Tagged with developer journal, github

If you want to get the list of repos (or any other resource) from Github, the items are paginated once there are more than 30. Here is an example of how you can use a recursive function to follow the pagination and return all items of a particular resource.

Given …


Continue reading

Reset UUID of virtualbox disk file

Posted on Wed 01 July 2020 in dev-journal • Tagged with virtualbox

Use this command to reset the UUID

VBoxManage internalcommands sethduuid ubuntu-vm/xubuntu-vm.vdi

Port forwarding in Virtualbox

Posted on Tue 30 June 2020 in dev-journal • Tagged with virtualbox

The virtualbox port forwarding dialog will be filled in to look like the following:

Add ssh port forward

The part that is always difficult to remember is that the guest ip address is 10.0.2.15.

To connect to that vm now

ssh -p 2001 [email protected]

Developer Journal: 29 June 2020

Posted on Mon 29 June 2020 in dev-journal • Tagged with developer journal

I so rarely need to run raw SQL queries that I have to look up how to use joins every time I need to use one.

sudo mkfs.ext4 /mnt
sudo gpasswd -a michael-abrahamsen storage

short LVM reference sheet

Posted on Sun 28 June 2020 in dev-journal • Tagged with developer journal

Creating a logical volume

sudo lvcreate -L 250G vg0 -n vms

Add livestream video stats to Google analytics

Posted on Wed 24 June 2020 in dev-journal • Tagged with developer journal

How can you get more granular stats for a livestream video? One option is to use Google analytics and google tag tracking.

https://www.analyticsmania.com/google-tag-manager-recipes/youtube-built-in/ has a great resource on how to set up a events with google analytics. I used this page as a resource when …


Continue reading

Developer Journal: 23 June 2020

Posted on Tue 23 June 2020 in dev-journal • Tagged with developer journal

Redirecting pages with Craft-CMS. A client was using Redirect Manager with to handle their redirects but in a moment of need today it stopped working. Luckily, Craft-CMS has a redirect tag that was able to be used. {% redirect "webinar" %}


Adding reCAPTCHA to a Flask site

Posted on Sat 20 June 2020 in dev-journal • Tagged with developer journal, flask, conveyor, python

This post will explain how to add Google reCAPTCHA to a Python Flask application using Flask-WTF.

The first thing you will need to do is get your SITE KEY and your SECRET KEY from Google reCAPTCHA Make sure to create a reCAPTCHA version 2 site. Version 3 takes much more …


Continue reading

Developer Journal: 15 June 2020

Posted on Mon 15 June 2020 in dev-journal • Tagged with developer journal

Another day working with Craft CMS

Using the codebase that the client gave me I was struggling to figure out how they were embedding their youtube videos into a page. The html for the section I was trying to duplicate looks like this:

<section id="intro" class="">
    <div class="container-fluid …

Continue reading

Developer Journal: 12 June 2020

Posted on Fri 12 June 2020 in dev-journal • Tagged with developer journal, craft cms

I'm creating a new page with editable fields using Craft CMS. I've never used Craft and am working on an already created site. With the large amount of field groups already created it was difficult to follow the docs as they said to Add a new field group. I could …


Continue reading

Developer Journal: 10 June 2020

Posted on Wed 10 June 2020 in dev-journal • Tagged with developer journal, craft cms

Today I am working to create a webinar registration page for a client. The proposed idea was to add a page to their Craft CMS site that would have a form to collect email addresses and send them confirmation and reminder emails. Instead of trying to figure out how to …


Continue reading

Improving site create flow on Conveyor.dev

Posted on Fri 05 June 2020 in conveyor • Tagged with conveyor, developer journal

Creating the first site on Conveyor.dev can use some improvement. Currently the user will need to create the site, create the server, then wait for the server to finish provisioning before heading to the "Sites" page where they can then see that the site has not been added to …


Continue reading