systemd

Fedora 28: Enable NumLock on Login

I lost my primary drive on Friday, and I’m having to rebuild a bunch of stuff. I didn’t document minor things like this before, so I am this time around. Hopefully someone else finds this useful. numlockx There are plenty of different ways to enable NumLock on login, including a decent manual approach. An official X extension, numlockx, can handle it automatically for us. There’s an unofficial mirror available to build the package from source, or you can check for it in official channels.

  • CJ Harries
    CJ Harries
Syntax Highlighting in LaTeX with minted
minted

Syntax Highlighting in LaTeX with minted

This post serves as an introduction to minted, a pygments-based syntax highlighter for LaTeX. Adding pygments to LaTeX streamlines so many things. The post provides a few examples of things you can do with minted, details the installation process, and covers some basic security. Code Overview Installing Python pip pygments TeX Dependencies minted -shell-escape Useful features What’s Next Code You can view the code related to this post under the post-01-overview tag.

  • CJ Harries
    CJ Harries
SSH Agent Forwarding Vulnerability and Alternative
ssh

SSH Agent Forwarding Vulnerability and Alternative

One of the things that I really like about ssh-agent is its ability to forward itself to remotes. By sending the agent instead of setting keys on each box, I’m locking down access to a few machines that I know and trust. It’s amazingly convenient and has saved me so much headache. As I was doing research for a previous post, I kept seeing hints that maybe forwarding the agent isn’t actually a very good idea.

  • CJ Harries
    CJ Harries
gitflow Subfeatures with gitflow-avh
gitflow

gitflow Subfeatures with gitflow-avh

I’m a huge fan of gitflow. It’s made my life much easier. However, I’ve noticed recently that, as the codebase grows, features can become disorganized or unwieldy. gitflow-avh solves this problem incredibly well by allowing features to be based off any branch. Note Code Problem Feature Per Item Two Features One Feature Solution Installation Using Subfeatures Problem Solved with Subfeatures Note This is not a gitflow overview. Check out the original branching model and the gitflow repo for more information on those.

  • CJ Harries
    CJ Harries
Installing wxPython 4.0 (Project Phoenix) on Fedora 27
wxPython

Installing wxPython 4.0 (Project Phoenix) on Fedora 27

I’ve stayed away from wxPython in the past because updates were slow and Python 3 wasn’t supported. Within the last couple of weeks, 4.0 was completed, which at least answers the Python 3 problem. I’ve been pounding my head against X11 idiosyncracies all weekend, so I thought I’d take a break and try it out. Dependencies It looks like the prequisites were sourced from Debian. $ sudo dnf install -y {dpkg,freeglut,gstreamer{,1}-plugins-ba{se,d-free},gtk3,lib{jpeg,notify,SM,tiff},python{2,3},SDL}{,-devel} @development-tools

  • CJ Harries
    CJ Harries
rofi: Matching and Sorting
rofi

rofi: Matching and Sorting

This is the fifth in a series of several posts on how to do way more than you really need to with rofi. It’s a neat little tool that does so many cool things. I don’t have a set number of posts, and I don’t have a set goal. I just want to share something I find useful. This post looks at configuring rofi’s matching and sorting. Assumptions Code Overview Comparison Basic Sort Config (Yet Another) rofi Options Script Full Script Change Matching and Sorting Via a modi Assumptions I’m running Fedora 27.

  • CJ Harries
    CJ Harries
rofi: Change Window Location
rofi

rofi: Change Window Location

This is the fourth in a series of several posts on how to do way more than you really need to with rofi. It’s a neat little tool that does so many cool things. I don’t have a set number of posts, and I don’t have a set goal. I just want to share something I find useful. This post looks at changing rofi’s window location. It also introduces some rofi dmenu usage to handle input and ends with a introduction to script modi.

  • CJ Harries
    CJ Harries
rofi: Overview and Installation
rofi

rofi: Overview and Installation

This is the first in a series of several posts on how to do way more than you really need to with rofi. It’s a neat little tool that does so many cool things. I don’t have a set number of posts, and I don’t have a set goal. I just want to share something I find useful. This post provides a rofi overview and installation instructions. Assumptions Code Overview Installation Dependencies Source Code Options Standard Debuggable Easy Mode Full Script Assumptions I’m running Fedora 27.

  • CJ Harries
    CJ Harries
CLI

Remove Consecutive Duplicate Lines With awk

I ran into an interesting problem yesterday. At some point, while scripting updates to a collection of repos, I managed to duplicate a few lines in several files. I ended up with something like this: README.md 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 # `dotfiles-role-javascript` # `dotfiles-role-javascript` [![Build Status](https://travis-ci.org/thecjharries/dotfiles-role-javascript.svg?branch=master)](https://travis-ci.org/thecjharries/dotfiles-role-javascript) [![GitHub tag](https://img.shields.io/github/tag/thecjharries/dotfiles-role-javascript.svg)](https://github.com/thecjharries/dotfiles-role-javascript)

  • CJ Harries
    CJ Harries
Ubuntu Notes: Unlocking /var/lib/dpkg
Vagrant

Ubuntu Notes: Unlocking /var/lib/dpkg

I ran into some issues this morning setting up a Xenial box via Vagrant. On boot, /var/lib/dpkg was totally locked with nothing I knew to link it to in ps aux. I’ve created a fairly novel solution; my point today was to learn about something new. You should have a basic familiarity with the Linux CLI. If you don’t know what systemd is, that’s not a big deal. Skip to my take on a full solution if you’d like, but make sure to read the disclaimer first.

  • CJ Harries
    CJ Harries
KeePass + ssh
KeePass

KeePass + ssh

I’ve been using KeePass Professional Edition for a few months now, and I’m always discovering new things to do with it. For example, I’ve got HQ photos of my driver’s license so that I can go to the gym without carrying my full wallet (if that’s illegal I totally don’t do that). I’ve got a couple of shared databases that sync off my main personal database that I can share with family and friends, which means I change update my accounts without the old hassle of texting everyone the new credentials.

  • CJ Harries
    CJ Harries
KeePass + FreeRDP
KeePass

KeePass + FreeRDP

One of my primary work responsibilities is to handle the Linux environments not related to our ecommerce platform (although, as one of few devs, one of my primary responsibilities is basically everything). We’re a big fan of the RHEL pipeline, so I use CentOS as my work environment. It bites occasionally, but, by and large, we don’t run bleeding-edge stacks because they’re, well, unsupported bleeding-edge stacks. I can find most of the software I need with older versions of Fedora or by just manually building things.

  • CJ Harries
    CJ Harries