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

Developer Journal: 20 April 2020

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

Updated the Conveyor register page to match the pricing on the marketing page. Whoops.

Based on the work that was accomplished yesterday with just using threads as a background process instead of a full blown worker queue, the question of what would happen if the python app was restarted while …


Continue reading

Developer Journal: 19 April 2020

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

Digging back into a piece of Conveyor that has not been visited for a while. The worker queue for running commands on a conveyor server. Working on making a prototype to test the idea of using threads instead of RQ.

Currently what has been done is refactoring the model to …


Continue reading

Developer Journal: 18 April 2020

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

Using Conveyor.dev to provision a server for an OpenVPN server

Wanted to create a vpn server today. Last time I did this manually and it was a bit of a learning process. While doing this again would certainly be faster, there was a script to completely take care of …


Continue reading

Developer Journal: 17 April 2020

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

While updating my system I ran into the following error:

$ sudo apt update
Ign:1 https://brave-browser-apt-release.s3.brave.com bionic InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Err:3 https://brave-browser-apt-release.s3.brave.com bionic Release
  Certificate verification failed: The certificate is NOT trusted. The …

Continue reading

Developer Journal: 16 April 2020

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

Automating developer journal entry creation

Wrote a script to help make creating developer journals easier to use. It was a simple zsh script but I had to look up a few things.

How do you check if a file already exists?

Found an example here

if test -f "$filename"; then …

Continue reading

Developer Journal: 15 April 2020

Posted on Wed 15 April 2020 in dev-journal • Tagged with developer journal, python, redis

Spent some time today trying to use Redis as a way to store a python dictionary. Given my lack of understanding of Redis, I struggled with how to do this and ended up just making a new key with the new value I wanted to store.

So now while the …


Continue reading