Skip to content

Instantly share code, notes, and snippets.

View christian-korneck's full-sized avatar
💭
I may be slow to respond.

Christian Korneck christian-korneck

💭
I may be slow to respond.
View GitHub Profile
@zachlewis
zachlewis / package.py
Last active February 14, 2022 03:25
alternate python rez package
name = "python"
version = "3.8.6"
authors = [
"Guido van Rossum"
]
description = \
"""
@nikolay-n
nikolay-n / defsmon.py
Last active October 29, 2022 14:26
Defaults Monitor - tool to sniff defaults keys and values using unified log
#!/usr/bin/python2.7
# -*- coding: utf-8 -*-
'''
Defaults Monitor - tool to sniff defaults keys and values using unified log
to launch use standard python 2.7, eg python2.7 ./defsmon.py
'''
import os
@kennovation1
kennovation1 / busmon.py
Last active February 8, 2025 14:04
Continuously monitor and pretty print Amazon EventBridge traffic as captured in CloudWatch Logs
# busmon.py
# Monitor CloudWatch Logs for EventBridge traffic.
#
# This script assumes that there is a Lambda function snooping an EventBridge bus
# and logging the events to a CloudWatch Logs group.
#
# Your format will likely be different and will require slight adjustments to the parsing
# logic below. The default format assumed for this version is:
# timestamp and other stuff|field|field|field|SNOOPED detail-type: <eventName> jsonString
# That is 5 pipe-delimited fields, where the last field is the only field used.
@dantheman213
dantheman213 / exponential_backoff.go
Last active December 10, 2022 16:10
Golang exponential back off simple example
package main
import "fmt"
import "time"
import "math"
var exponentialBackoffCeilingSecs int64 = 14400 // 4 hours
func main() {
fmt.Println("Hello World")
#!/bin/bash
# Relies on github API: https://developer.github.com/v3/repos/releases
# You can call this script with the following command
# ./helm-validate-and-publish.sh '<helm_url>' '<git_token>' '<git_owner>' '<github_repository>' '<git_commit_id>' '<index_branch>'
# Requires Helm v2 to already be installed
#############
@ReubenBond
ReubenBond / killall.ps1
Last active May 20, 2020 18:33
killall cmd for PowerShell with completion
# In a PS terminal, type "code $profile" and put this in there
function killall {
param(
[ArgumentCompleter(
{
param($cmd, $param, $values)
get-process |
? { $_.Name.StartsWith($values, [StringComparison]::OrdinalIgnoreCase) } |
@gwalkey
gwalkey / gist:c6d889884c3bb4a835c99f65b4d39ab6
Last active September 4, 2024 15:14
Powershell Anonymous Lamda for Retry with Exponential Backoff
# https://vexx32.github.io/2018/10/26/Anonymous-Functions/
function Retry()
{
param(
[Parameter(Mandatory=$true)][Action]$action,
[Parameter(Mandatory=$false)][int]$maxAttempts = 3
)
$attempts=1
@dvdveer
dvdveer / create_lfs_bundle.sh
Created April 29, 2020 16:38
Shell script to create a git bundle including changed LFS files
#!/bin/sh
# This script creates a bundle of git commits between START and END.
# It also tars the lfs files that changed in those commits.
# When you unbundle on the receiving side you should untar the LFS tar *before*
# running 'git pull' on the bundle file.
# Note that this is just an example script that doesn't do error checking, and
# also doesn't account for submodules, etc. YMMV
# Start and end commits of bundle
@thesubtlety
thesubtlety / golang-windows-dll.go
Created February 5, 2020 05:18
Calling Windows DLLs from Go
package main
import (
"fmt"
"syscall"
"unicode/utf16"
"unsafe"
)
//https://github.com/golang/go/wiki/WindowsDLLs
@BigRoy
BigRoy / avalon_cgwire_qtazu_link.py
Last active February 27, 2024 23:21
Example API for linking CG-Wire with Avalon with Qtazu