Skip to content

Instantly share code, notes, and snippets.

View kmf's full-sized avatar
🍇
Grape expectations

Karl Fischer kmf

🍇
Grape expectations
View GitHub Profile
@kmf
kmf / up-and-running-ansible-awx.md
Created January 24, 2024 12:28 — forked from cdot65/up-and-running-ansible-awx.md
Install Ansible AWX on Rancher k3s

up-and-running-ansible-awx

A reference for spinning up Ansible AWX on top of a Kubernetes environment

k3s install

Install k3s with bash script

curl -sfL https://get.k3s.io | sh -
@kmf
kmf / obsidianTodayWidget.js
Created December 27, 2021 06:54 — forked from rberenguel/obsidianTodayWidget.js
Quick-and-dirty Scriptable (https://scriptable.app/) script to show a medium widget with today's tasks from Obsidian, for my set up (today is in journal/YYYYMMDD.md, tasks are under the `### Plan` heading). Optionally pass "tomorrow" as widget arg to render tomorrow (if it doesn't exist it will fail of course)
let when = args.widgetParameter || 'today'
let now = new Date()
if (when == 'tomorrow') {
now.setDate(now.getDate() + 1);
}
let formatter = new DateFormatter()
formatter.dateFormat = 'yyyyMMdd'
let today = formatter.string(now)
#!/bin/bash
OLDIFS=$IFS
export IFS=$'\n'
# Find all boxes which have updates
AVAILABLE_UPDATES=$(vagrant box outdated --global | grep outdated | tr -d "*'" | cut -d ' ' -f 2 2>/dev/null)
if [[ ${#AVAILABLE_UPDATES[@]} -ne 0 ]]; then
{
"__inputs": [
{
"name": "DS_INFLUXDB",
"label": "InfluxDB",
"description": "",
"type": "datasource",
"pluginId": "influxdb",
"pluginName": "InfluxDB"
}
@kmf
kmf / api-curl.sh
Created February 23, 2021 07:55 — forked from paulmooring/api-curl.sh
curl request script for Chef servers
#!/usr/bin/env bash
# Author:: Paul Mooring (<paul@opscode.com>)
# Author:: Steven Danna (<steve@opscode.com>)
# Copyright:: Copyright (c) 2013 Opscode, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@kmf
kmf / private.xml
Created October 30, 2020 15:48 — forked from localghost666/private.xml
Karabiner setting file for Logitech K360 & M545
<?xml version="1.0"?>
<root>
<!-- Logitech K360 Keyboard -->
<item>
<name>Logitech K360 Keyboard for Mac OS X</name>
<devicevendordef>
<vendorname>LOGITECH</vendorname>
<vendorid>0x046d</vendorid>
</devicevendordef>
<deviceproductdef>
@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 / .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"
}
]