Deleting a single certbot certificate

Posted on Thu 10 October 2019 in github apps • Tagged with webdev, certbot, letsencrypt

# run the following command 
certbot delete --cert-name domain.com

Why would you want to do this? In my case I had created certificates for www.conveyor.dev and conveyor.dev. I decided to use a redirect for traffic to conveyor.dev to www.conveyor.dev, by doing that the certbot …


Continue reading

Github apps: Creating and installing an app with Flask

Posted on Sat 21 September 2019 in github apps • Tagged with python, flask, github, conveyor, webdev, webhooks

Create a Github app to integrate with Github

demo

Using a Github app is the preferred way integrate with Github. By creating a Github app you can give your users more granular control of what you have access to. By transitioning Conveyor.dev to use a Github app the level of …


Continue reading

Create a navigation sidebar with flask

Posted on Wed 28 August 2019 in python • Tagged with python, flask, sidebar, conveyor, webdev

Why a sidebar?

The site page on conveyor.dev has started to get out of control and I felt that it was time to do a little redesign.

Currently all of the site features are listed on a single page and many of them only need to be set up …


Continue reading

Conveyor Early Access now open

Posted on Wed 21 August 2019 in posts • Tagged with python, conveyor

Conveyor.dev early access

Early access to Conveyor is now available.

Visit conveyor.dev to apply.

Conveyor simplifies deployments and lets you focus on building applications

Automatic server provisioning

Site management and deployment

Create PostgreSQL and MySQL databases

Manage your application workers


Continue reading

Pelican static site on Netlify

Posted on Tue 14 May 2019 in python • Tagged with python, pelican, static, netlify

Setup the project

$ mkdir pelican-netlify-cms && cd $_

# create and activate a virtual environment for your project, for example:
$ python -m venv venv
$ source venv/bin/activate

Create a requirements.txt file. This is important as Netlify will look for this file to determine dependencies. In the file:

pelican …

Continue reading

Create a systemd unit for i3lock on suspend

Posted on Tue 04 December 2018 in linux • Tagged with linux, arch, i3lock, i3, systemd

See Creating a custom lockscreen with i3lock to setup the lockscreen script

Add a service file to run the script when the computer sleeps or suspends

Create a file /etc/systemd/system/[email protected] with the following contents. (Change the username to be your local user account name)

[Unit]
Description …

Continue reading

Creating a custom lockscreen with i3lock

Posted on Tue 09 May 2017 in linux • Tagged with linux, arch, i3lock, i3

Instead of the default i3 lockscreen (which is just a plain white screen), you can show an image as the background. You can create a script to show a blurred image of the content on your screen to get the following effect.

Screenlock

Create the script

The short script below will …


Continue reading

ZFS Scrubbing

Posted on Mon 01 May 2017 in zfs • Tagged with zfs

A simple way to check the data integrity of a ZFS pool is by scrubbing the data. This process goes through all of the data and ensures it can be read.

To start a scrub you can run the command:

$ zpool scrub <pool>

If you would like to stop a …


Continue reading

Creating Multiple SSH Key Settings For Github Accounts

Posted on Wed 29 March 2017 in git • Tagged with git, github, ssh

Create a new ssh key for the second account

$ ssh-keygen -t rsa -b 4096 -f "$HOME/.ssh/masecondgit_rsa

Create an ssh config

Create a file at ~/.ssh/config

# create the first host to use your original key as default
Host github.com
    IdentityFile ~/.ssh/id_rsa
    HostName github.com
    User mikeabrahamsen …

Continue reading

Replacing Tmux with Neovim

Posted on Mon 27 March 2017 in Neovim • Tagged with vim, neovim, tmux

While I have tried to use my window manager i3 for creating workspaces for development workflow, I just have not been able to find a completely comfortable solution. There is something about switching between terminals and vim through i3 that I did not find as convenient as my tmux setup …


Continue reading

Replace WLAN / Wifi Card on Lenevo Ideapad u310

Posted on Thu 16 March 2017 in Laptop • Tagged with fixes

The Lenovo Ideapad u310 has been plagued with terrible wifi issues. There was even a class action settlement for it. Upgrading the WLAN card, while a reasonable solution, is not as easy as opening up the laptop and putting a new card in. Lenovo has locked the computer from using …


Continue reading

Setting up ZFS with Arch root install

Posted on Fri 10 March 2017 in Linux • Tagged with linux, arch, zfs

Configuration overview

The last setup of this machine was an UNRAID install with virtual machines using PCI passthrough. For this setup I am going to run Arch Linux with a root install on ZFS. The root install will allow snapshots of the entire operating system.

Array hardware

  • Boot Drive        - 32 …

Continue reading

Creating Arch Linux iso with ZFS installed with EFI system

Posted on Wed 08 March 2017 in Linux • Tagged with linux, arch, zfs

Adding ZFS to the iso can save you some time when you are experimenting with the setup as you will not have to add the repository and install each time you restart the machine this way.

Download archiso

# switch to root
$ sudo -i or su root

# Install archiso
$ pacman -S …

Continue reading

Setting up Less CSS with Django

Posted on Thu 23 January 2014 in Python • Tagged with less, django, css

I recently started using Less Css with Django, after using it briefly I found that I did not want to manually compile Less after making changes during development. Using this approach I am able to compile Less client-side during development and have django-compressor compile server-side on live site.

1. Install …


Continue reading

South migration - table already exists

Posted on Tue 24 September 2013 in Python • Tagged with python, django, south

I was recently adding a slug field to a model in a Django application when I ran into this error when doing the South migration:

Error in migration: test_app:0002_auto__add_field_category_slug
DatabaseError: table "_south_new_test_app_category" already exists

When South makes changes to an existing table, it creates a new table with a …


Continue reading

Using The ADXL335 Accelerometer With Arduino

Posted on Wed 20 October 2010 in posts • Tagged with adxl335, arduino

Setting up the DXL335 triple axis accelerometer is pretty straight forward. First I soldered 6 straight breakaway headers into the ADXL335 in order to easily plug the breakout board directly into the analog pins in the Arduino.

Once soldered I plugged the accelerometer in to the following pins:

Breakout Pin …


Continue reading

750 Words

Posted on Wed 24 March 2010 in Writing • Tagged with writing

I have been using the site 750words.com for a while now and have come to really enjoy using it. At first I had a little trouble navigating the site and the links didn’t seem very intuitive. However, I caught on fast and have no trouble getting around the …


Continue reading