Skip to content

Instantly share code, notes, and snippets.

View jamesmcdonald's full-sized avatar

James McDonald jamesmcdonald

View GitHub Profile
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
/* 101 bytes - the 102nd is the \n */
#define BYTES "This line of text has been engineered by " \
"only the very finest, wisest squirrels to contain 102 bytes."
void usage(char *progname)
{
#!/bin/bash
# post-receive hook to trigger r10k over ssh on updates to puppet control repo
# Set SSHTARGET in ~/.config/puppet-update to eg:
# root@puppet.example.com
# The ssh target should have an authorized_key with eg:
# command="/usr/local/sbin/puppet-update.sh"
# That script need simply call:
# /path/to/r10k deploy environment $SSH_ORIGINAL_COMMAND
@jamesmcdonald
jamesmcdonald / ynabimport.pl
Last active August 22, 2016 07:55
Convert Skandiabanken export data to something YNAB will import
#!/usr/bin/perl -w
# ynabimport.pl
# James McDonald <james@jamesmcdonald.com>
# Cook data from skandiabanken for import into YNAB. Entirely based on
# guesswork and reverse-engineering from failures, so ymmv.
# To use this, follow these steps:
- name: my play that does stuff
hosts: all
vars_prompt:
username: "enter a username"
or
vars_prompt:
- username: "enter a username"
default: someone