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 / index.html
Last active June 28, 2022 12:46
Ansible Self Healing
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="2">
<title>Obsidian Systems</title>
<link rel="stylesheet" href="./style.css">
</head>
<body>
@kmf
kmf / style.css
Created June 28, 2022 06:52
Ansible Self Healing Demo
html, body{
-webkit-font-smoothing:antialiased;
font-family: "Comic Sans MS", sans-serif;
line-height:1.4;
margin:0 auto;
max-width:860px;
height: 100%;
color: #30a3b7;
}
.center{
@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
Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
Start-Service sshd
Set-Service -Name sshd -StartupType 'Automatic'
Get-NetFirewallRule -Name *ssh*
New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
@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