Skip to content

Instantly share code, notes, and snippets.

View steinbrueckri's full-sized avatar
🤘

Richard Steinbrück steinbrueckri

🤘
View GitHub Profile
@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"
@iaindooley
iaindooley / delete_older_than_1_year
Created February 21, 2019 06:50
Delete cards older than 1 year
//schedule this function to run tomorrow at 3am using a time trigger
//in your Trellinator configuration sheet. It will then
//execute daily
function deleteOlderThanOneYear(board,signature,original_time)
{
new Board(board).list("Completed").cards().each(function(card)
{
if(card.movedToList() < Trellinator.now().minusDays(365))
{
card.archive();
@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
@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>
@agoldis
agoldis / delete-github-package.graphql
Created October 25, 2019 05:26
Github - delete private package
# get version id
query($name: String!, $owner: String!) {
repository(name: $name, owner: $owner) {
id
name
registryPackages(first: 10) {
nodes {
versions(first: 10) {
nodes{
id
@ggamel
ggamel / palenight.js
Last active May 3, 2022 16:32
Material Palenight Color Scheme for Blink Shell
// Material Palenight Color Scheme for Blink Shell
// by Greg Gamel (https://github.com/ggamel) (https://greg.is)
black = '#292d3e';
red = '#f07178'; // red
green = '#c3e88d'; // green
yellow = '#ffcb6b'; // yellow
blue = '#82aaff'; // blue
magenta = '#c792ea'; // pink
cyan = '#89ddff'; // cyan
@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
@coodix
coodix / gist:4fc9e68eef869e183cd42c662b7a6050
Created September 24, 2020 11:08
1password op cli load keys to ssh agent
op list items --tags ssh | op get item - --fields title | parallel -l 1 'op get item {} --fields notesPlain | ssh-add -'
@kevinkub
kevinkub / incidence.js
Last active June 27, 2023 12:53
COVID-19 Inzidenz-Widget für iOS innerhalb Deutschlands 🇩🇪
// Licence: Robert Koch-Institut (RKI), dl-de/by-2-0
class IncidenceWidget {
constructor() {
this.previousDaysToShow = 31;
this.apiUrlDistricts = (location) => `https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/RKI_Landkreisdaten/FeatureServer/0/query?where=1%3D1&outFields=RS,GEN,cases7_bl_per_100k,cases7_per_100k,BL&geometry=${location.longitude.toFixed(3)}%2C${location.latitude.toFixed(3)}&geometryType=esriGeometryPoint&inSR=4326&spatialRel=esriSpatialRelWithin&returnGeometry=false&outSR=4326&f=json`
this.apiUrlDistrictsHistory = (districtId) => `https://services7.arcgis.com/mOBPykOjAyBO2ZKk/ArcGIS/rest/services/Covid19_hubv/FeatureServer/0/query?where=IdLandkreis%20%3D%20%27${districtId}%27%20AND%20Meldedatum%20%3E%3D%20TIMESTAMP%20%27${this.getDateString(-this.previousDaysToShow)}%2000%3A00%3A00%27%20AND%20Meldedatum%20%3C%3D%20TIMESTAMP%20%27${this.getDateString(1)}%2000%3A00%3A00%27&outFields=Landkreis,Meldedatum,AnzahlFall&outSR=4326&f=json`
this.stateToAbbr = {
@thbkrkr
thbkrkr / gcloud-ssh-sysctl-vmmaxmapcount.sh
Created November 7, 2019 19:42
Set vm.max_map_count=262144 on the nodes of a GKE cluster #k8s
#!/bin/bash -eu
# Increase Virtual Memory for Elasticsearch on GKE
# https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html
# Dependencies: kubectl, gcloud, jq
nodes() {
kubectl get nodes -o custom-columns=n:.metadata.name --no-headers
}