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