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

Continue reading

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" %}


Continue reading

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

Developer Journal: 01 June 2020

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

Updates to the registration page

To allow Flask developers to use Conveyor without a subscription some changes will need to be made to the registration page.

I wanted to make sure the onboarding process for new users is as easy as possible. To help with that, I am removing the …


Continue reading

Developer Journal: 28 May 2020

Posted on Thu 28 May 2020 in dev-journal • Tagged with developer journal

Made a chart comparing some of the features of virtual conference apps. The comparison includes: Fonteva, cVent, Whova, vFairs, Evia, and All In the Loop

Virtual Conference app comparison


Continue reading

Developer Journal: 20 May 2020

Posted on Wed 20 May 2020 in dev-journal • Tagged with developer journal

When running chsh -s /bin/zsh the command would fail with Shell not changed. The solution was to use chsh -s /usr/bin/zsh which does not fully make sense to me because chsh -l lists both /usr/bin/zsh and /bin/zsh. Fixed and moving on.


Continue reading

Installing full system encrypted arch linux

Posted on Tue 19 May 2020 in dev-journal • Tagged with developer journal

This is a documentation of an Arch Linux installation with luks and lvm.

The drive will use a boot partition which will remain unencrypted with a second partition which will be encrypted with luks and then use lvm to create volumes within the lux encrypted partition.

Resources: https://computingforgeeks.com …


Continue reading

Developer Journal: 18 May 2020

Posted on Mon 18 May 2020 in dev-journal • Tagged with developer journal, conveyor

Found a UI bug on the Conveyor event output. The close button is outside of the event modal.

Close button bug

To fix this I'm actually going to move the close button up to the top right corner and make it an X. Just a small rearrangement of html:

<div class="border-b text-center …

Continue reading

Developer Journal: 15 May 2020

Posted on Fri 15 May 2020 in dev-journal • Tagged with developer journal

Today I wanted to write a function to send me an email when someone registers for conveyor.dev

To do this I wrote the following test:

@patch('routes.send_reg_notification_email')
@patch('stripe.Customer.create')
@patch('stripe.Subscription.create')
def test_notification_email_is_sent(self, mock_sub, mock_cust, mock_email):
    mock_cust.return_value = stripe_customer
    mock_sub.return_value = stripe_subscription
    self …

Continue reading

Gemini Trading Script

Posted on Mon 11 May 2020 in dev-journal • Tagged with developer journal, crypto, python, api

Created a short script today to make trades on the gemini platform. Simple, not DRY, and it works. One improvement I will probably make the next time I use this is to change the buy function to accept units of a currency other than dollar.

import requests
import json
import …

Continue reading

jedi-vim popup on dot

Posted on Sun 10 May 2020 in dev-journal • Tagged with developer journal

After installing jedi-vim earlier this year and just using it's default settings I finally made some time today to figure out a couple issues that I have been missing. All that meant was taking a few minutes to read the docs.

What I've been wanting the most is for an …


Continue reading

Convert all videos into directory to audio only

Posted on Fri 08 May 2020 in dev-journal • Tagged with developer journal

Here is a script I wrote today to convert all .mp4 videos in a folder to audio so I can listen to them while I drive.

!#/bin/bash
find -name '*.mp4' | while read file
do
    filename=$(basename -- "$file")

    # get the file extension - this line could be useful in other cases …

Continue reading

Developer Journal: 07 May 2020

Posted on Thu 07 May 2020 in dev-journal • Tagged with developer journal

Finishing event parsing branch

I left off with this branch last by writing a unit test

def test_event_parses_byte_string_list(self):
    test_data = [b'', b'Fetching origin\n', b"Your branch is up to date"]
    expected_output = "Fetching origin\nYour branch is up to date"
    output = parse_events(test_data)
    self.assertEqual(expected_output, output)

Once …


Continue reading

Developer Journal: 04 May 2020

Posted on Mon 04 May 2020 in dev-journal • Tagged with developer journal

Today is a travel day so I'm going to work on closing up some loose ends. There was a question about the i3 lock post over the weekend so I made some edits to that post to help clarify.

Added posts that have been sitting in drafts.. even if they …


Continue reading

Developer Journal: 03 May 2020

Posted on Sun 03 May 2020 in dev-journal • Tagged with developer journal

After a refactor in Conveyor.dev the event output display became a bit hard to read and needs some rework. The biggest issue right now is getting the output from a server command returns a list of byte objects generated based on the stdout and stderr of the command.

So …


Continue reading

Developer Journal: 02 May 2020

Posted on Sat 02 May 2020 in dev-journal • Tagged with developer journal

The goal for today is to clean up how site log files are stored

First, creating a subdirectory for each site in the /var/log/uwsgi/ folder will help keep things organized. This directory should be made when the site is created. The permissions will also need to be updated …


Continue reading

Developer Journal: 01 May 2020

Posted on Fri 01 May 2020 in dev-journal • Tagged with developer journal

While getting things ready for today I used the command to create a new journal entry for the next day dev-journal 1. When doing this on the last day of the month the title for the entry was incorrect. The title generator was echo "Title: Developer Journal: $(date +%d" "%B …


Continue reading

Developer Journal: 30 April 2020

Posted on Thu 30 April 2020 in dev-journal • Tagged with developer journal

Today is going to be a short coding session. My only plan is to write a test for an issue that is not allowing the rotation of site logs to work correctly. The problem is just a permission issue as the user does not have permission to write to the …


Continue reading

Developer Journal: 29 April 2020

Posted on Wed 29 April 2020 in dev-journal • Tagged with developer journal

Updating the dev-journal script to open previous day

This morning when starting this entry I wanted to be able to check look at what I was was working on yesterday and found that what I've been doing is navigating to the file and opening the previous day. However, since I …


Continue reading

Developer Journal: 28 April 2020

Posted on Tue 28 April 2020 in dev-journal • Tagged with developer journal

Yesterday I wrote a very simple test for a delete route:

@patch('app.models.launch_task')
def test_delete_removes_worker_from_db(self, mock_launch):
    mock_launch.return_value = ""
    login_user(self.client, email=self.user.email, password='password')

    self.client.delete(self.base_url)
    workers = SiteWorker.query.all()
    self.assertEqual(len(workers), 0)

To allow that test to pass …


Continue reading

Developer Journal: 27 April 2020

Posted on Mon 27 April 2020 in dev-journal • Tagged with developer journal

Working on creating a release for Conveyor that will implement the rq-gevent-worker and additional bug fixes.

Updated the rq-gevent-worker setup.py and added same documentation to the readme.

The original owner seems to have abandoned this project but I wanted to make sure the author stayed in the package so …


Continue reading

Developer Journal: 25 April 2020

Posted on Sat 25 April 2020 in dev-journal • Tagged with developer journal

Fixing a bug that was introduced when changing the create server view to no longer include a radio field for the server provider. The logic was changed to use request arguments to generate the correct form but the view was not updated to do the same as the form field …


Continue reading

Developer Journal: 24 April 2020

Posted on Fri 24 April 2020 in dev-journal • Tagged with developer journal

Would would this look like if it were easy?

This is the single most important question I have been asking myself lately. It motivates me to simplify the process. Today this question helped me write some additional logic to my screenshot hotkey to simplify the process of adding photos to …


Continue reading

Developer Journal: 23 April 2020

Posted on Thu 23 April 2020 in dev-journal • Tagged with developer journal

Looking into using Facebook Workplace as a place that virtual conference attendees can network with each other. There is a nice writeup at https://www.contentandcode.com/blog/an-introduction-to-facebook-workplace/ that goes over the basic features.

Most of today was spent doing design work. Found a great hotkey for figma which …


Continue reading

Developer Journal: 22 April 2020

Posted on Wed 22 April 2020 in dev-journal • Tagged with developer journal

Creating a new command to save screenshots in my dev journal folder

This meant adding the convert -trim command that I discovered recently into the screenshot command for i3. In addition to that a new command was created that would save the screenshots in a different location.

# .config/i3/config …

Continue reading