Getting Magent Links from Deluge

My latest weekend-hack is a plugin that shows the magnet link for a torrent entry

Why

I had something torrented a long time ago, and a friend asked me for the torrent.
However, I haven't kept the original .torrent file, she was tech-oriented enough so I can give her ...

more ...

Prettify HTML pages with BeautifulSoup

The story

Today I wrote some HTML page by hand (my new homepage).
I then used this script to make the HTML code nicer:

The script

This requires the BeautifulSoup module for python

#!/usr/bin/env python

import sys
from bs4 import BeautifulSoup

def bs_file(filename):
    with open(filename, 'r ...
more ...

Keeping Windows Awake (with PowerShell)

The story

I got a new game on Steam and got set to downloading it.
For some reason, Steam and Windows have decided that it's better to save some electricity and put my computer to sleep, rather than finish my game.
Today I discovered that instead of playing my ...

more ...

Chef "Share This" script

I wrote this little script to upload the current cookbook to the Chef Supermarket.
It should be run from within the cookbook's directory.

#!/bin/bash
knife cookbook site share -o ../ $(basename $(realpath .)) -c ~/.chef/knife-supermarket.rb

Where my supermarket config is as simple as:

node_name 'SUPERMARKET_USERNAME'
client_key 'CLIENTKEY_LOCATION'

Interesting ...

more ...

Dry Run for Python Pip

As I wrote some time ago, I started my own python cookbook for Chef because I didn't like the direction the "default" one was going.
I recently added a new feature that I wanted to talk about. I called it smart_install in the cookbook, but it's actually a ...

more ...


Chef Custom Resources - Missing Documentation

The new Chef documentation for Custom Resources is pretty lackluster.
This is probably because they're too busy making awesome stuff, but I still needed to learn some stuff the hard way.
Thought I'd share them.

The basics

There is no longer a "state-only" resource and an implementing provider ...

more ...

Parsing AWS billing

The Story

I never understood the AWS billing very well and happily left it to my CTO.
A couple of days ago, however, my CTO secretly told me he's mainly interested in learning 2 things from those bills:

  1. How much are we paying for every component of the application ...
more ...

Managing Jenkins API Tokens

The problem

Api Tokens are like user passwords, except they are always managed by Jenkins (even if you're using an external authentication scheme), and can only be used for "API" actions (e.g. using curl).
The storage scheme of these tokens is a little weird - the stored value is ...

more ...

Open-Gridview - the FOSS Out-Gridview

The Story

I've been a Microsoft SysAdmin for a long time before switching for Linux. During which, I scripted a lot in PowerShell.
PowerShell has several "output" functions like Out-File (which passes the input to a file), Out-Null etc.
One of these functions was Out-Gridview which tabularizes its input ...

more ...