Skip to content

Instantly share code, notes, and snippets.

View kmf's full-sized avatar
🐧
Penguins make great Robots

Karl Fischer kmf

🐧
Penguins make great Robots
View GitHub Profile
@kmf
kmf / convertjsoncsv.rb
Created October 21, 2020 10:15 — forked from jordan-thoms/convertjsoncsv.rb
Code to convert json to csv, with correct headings Usage: ruby convertjsoncsv.rb <input file> <output file>
require 'csv'
require 'json'
require "set"
json = JSON.parse(File.open(ARGV[0]).read)["results"]
# Pass 1: Collect headings
headings = SortedSet.new
json.each do |hash|
headings.merge(hash.keys)
end
@kmf
kmf / .kitchen.yml
Created August 1, 2020 07:02 — forked from grv87/.kitchen.yml
Test Kitchen - use SSH transport for Windows
driver:
name: ec2
image_search:
name: Windows_Server-2016-English-Full-Base-*
region: eu-west-1
subnet_id: subnet-3615b351
instance_type: t2.micro
aws_ssh_key_id: kitchen
security_group_ids:
- sg-496eaa31
@kmf
kmf / .vimrc
Created April 24, 2020 14:55
.vimrc
set nocompatible " be iMproved, required
filetype off " required
syntax on
set background=dark
set encoding=UTF-8
let mapleader = "\<Space>"
set number relativenumber
set guifont=MesloLGSNerdFontComplete-Regular:h18
set path+=**
[2019-05-16T20:18:38+00:00] DEBUG: Reading products and relationships...
[2019-05-16T20:18:38+00:00] DEBUG: Successfully read products and relationships
[2019-05-16T20:18:38+00:00] DEBUG: Searching for the following licenses: ["infra-client", "inspec"]
[2019-05-16T20:18:38+00:00] DEBUG: Found license chef_infra_client at /etc/chef/accepted_licenses/chef_infra_client
[2019-05-16T20:18:38+00:00] DEBUG: Found license inspec at /etc/chef/accepted_licenses/inspec
[2019-05-16T20:18:38+00:00] DEBUG: Missing licenses remaining: []
[2019-05-16T20:18:38+00:00] DEBUG: All licenses present
[2019-05-16T20:18:38+00:00] DEBUG: Running Ohai with the following configuration: {:logger=>Chef::Log}
Starting Chef Infra Client, version 15.0.293
[2019-05-16T20:18:38+00:00] INFO: *** Chef Infra Client 15.0.293 ***
@kmf
kmf / processes.rb
Created June 20, 2018 19:23
How I would like to see processes in OHAI
# Encoding: utf-8
Ohai.plugin(:Processes) do
provides 'processes'
collect_data(:linux) do
processes Mash.new
so = shell_out('ps -axco command,pid,euser')
so.stdout.lines do |line|
Verifying my Blockstack ID is secured with the address 13zWJbNRNrkPfRUkrpEhm6tZFRwAPKShez https://explorer.blockstack.org/address/13zWJbNRNrkPfRUkrpEhm6tZFRwAPKShez
@kmf
kmf / .kitchen.local.yml
Created June 22, 2017 14:03 — forked from erichelgeson/.kitchen.local.yml
kitchen.local.yml cache chef package (simple)
driver:
synced_folders: [
["./chef-installer", "/tmp/chef-installer"]
]
provisioner:
chef_omnibus_url: file:///tmp/chef-installer/install.sh # curl can accept a local file:// url
@kmf
kmf / form.json
Created August 30, 2016 18:37 — forked from anonymous/form.json
A saved configuration for a schema form example, http://textalk.github.io/angular-schema-form/examples/bootstrap-example.html
[
"*",
{
"type": "submit",
"title": "OK"
}
]
@kmf
kmf / sshplus.py
Created May 3, 2016 08:10 — forked from kepler/sshplus.py
SSHplus
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# SSHplus
# A remote connect utlity, sshmenu compatible clone, and application starter.
#
# (C) 2011 Anil Gulecha
# Based on sshlist, incorporating changes by Benjamin Heil's simplestarter
#
# This program is free software: you can redistribute it and/or modify

Keybase proof

I hereby claim:

  • I am kmf on github.
  • I am kmf (https://keybase.io/kmf) on keybase.
  • I have a public key whose fingerprint is E8B5 2C5E 3CC7 7D85 4C1A BC05 3749 3CA2 C9BF 4BFE

To claim this, I am signing this object: