Skip to content

Instantly share code, notes, and snippets.

View steinbrueckri's full-sized avatar
🤘

Richard Steinbrück steinbrueckri

🤘
View GitHub Profile
@brandonpittman
brandonpittman / of.zsh
Last active August 4, 2020 08:13
A simple shell function to create tasks in OmniFocus
#!/bin/zsh
# If you use #'s for defer and start dates, you'll need to escape the #'s or
# quote the whole string.
function of () {
if [[ $# -eq 0 ]]; then
open -a "OmniFocus"
else
osascript <<EOT
@omame
omame / zfs-arc-statsd.sh
Created April 1, 2015 16:44
Send ZFS Linux metrics to statsd
#!/bin/bash
# A port of ZFS stats for FreeBSD plugin to Linux, adapted to send metrics to statsd.
#
# Author: Daniele Valeriani <daniele@valeriani.co.uk>
# Author of the original munin plugin: David Bjornsson <dabb@lolnet.is>
# Author of the Linux port: Alex Chistyakov <alexclear@gmail.com>
PREFIX="servers.`hostname`.zfs"
STATSD_ADDR="YOUR STATSD SERVER"
@hh
hh / hardened_winrm_ssl_aws_windows.rb
Created October 1, 2015 16:19
Winrm over SSL reusing rdp certificate
require 'chef/provisioning/aws_driver'
require 'byebug'
current_dir = File.dirname(__FILE__) # to get relative files... encrypted databag
with_chef_server "https://api.chef.io/organizations/#{ENV['CHEF_ORG']}",
:client_name => Chef::Config[:node_name],
:signing_key_filename => Chef::Config[:client_key]
setup_winrm_ssl_user_data = <<EOD
<powershell>
@adyrcz
adyrcz / OpsReadiness.md
Last active October 31, 2022 12:25
Operational Readiness Checklist

Operational Readiness Checklist

Types of Operability Requirements

  • Project Requirements
  • Configuration Management
  • CI/CD
  • Service Level Managment Requirements
  • Monitoring
@andreicristianpetcu
andreicristianpetcu / ansible-summary.md
Created May 30, 2016 19:25
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

Favorites:
Unrefined:
!(@home|@$WIFE|@phone|@laptop|@desk|@errand|@office|##$EMPLOYER|##Someday/Maybe) & !search:* |
(no priority & !search:* & !recurring & !##Someday/Maybe) |
(!search:: & !##Someday/Maybe & !recurring & !no priority) |
##Inbox,
(##Someday/Maybe|@not_now) & (!no due date|@next)
Home:
@negz
negz / kubedump.sh
Last active March 6, 2024 18:42
Dump Kubernetes cluster resources as YAML
#!/usr/bin/env bash
set -e
CONTEXT="$1"
if [[ -z ${CONTEXT} ]]; then
echo "Usage: $0 KUBE-CONTEXT"
exit 1
fi
@dikiaap
dikiaap / git-io-custom-url.md
Last active May 7, 2024 17:34
git.io custom URL

Update: As of 11 January 2022, git.io no longer accepts new URLs.

Command:

curl https://git.io/ -i -F "url=https://github.com/YOUR_GITHUB_URL" -F "code=YOUR_CUSTOM_NAME"

URLs that can be created is from:

  • https://github.com/*
  • https://*.github.com
@wadefletch
wadefletch / todo.py
Last active April 10, 2024 14:57
Print from Todoist API to USB Thermal Printer
import todoist
from escpos import printer
therm = printer.Usb(0x0416, 0x5011) # connect to printer
api = todoist.TodoistAPI('79d4d663cc5011ab78cd7004e26a1a060572c823') # connect to todoist
api.sync() # get new data from todoist
therm.image('name.png') # print header image
therm.text('\n') # add a blank line