Skip to content

Instantly share code, notes, and snippets.

View kimsondrup's full-sized avatar

Kim Sondrup kimsondrup

View GitHub Profile
@kimsondrup
kimsondrup / starship.toml
Created December 22, 2023 14:32
My Starship terminal configuration file
#                                 
# brew tap homebrew/cask-fonts
# brew install font-hack-nerd-font
format = """
[](fg:#0969da bg:#0969da)\
$username\
[](fg:#0969da bg:#eac54f)\
$directory\
@kimsondrup
kimsondrup / wsl-path-filter-wrapper.sh
Last active May 17, 2024 08:43
WSL wrapper: Filter Windows path from the PATH env. for "linked" commands
#!/usr/bin/env bash
# This script is designed to introduce "filtered PATH" where Windows paths (/mnt/<drive letter>) are removed
# as to help with commands that have problems handling those paths being present in PATH.
# To use this script you need to create a symlink pointing to this script with the same name as a command in your PATH,
# this script will find and execute the original command from the filtered PATH and passing on the filtered PATH.
# Note that you need to create the symlink manually before using this script.
# The symlink could be placed in a directory located at "$HOME/bin" in PATH and creating the link there
# See https://gist.github.com/kimsondrup/f22717fa7677b21d14284964fc8d06e7
@kimsondrup
kimsondrup / bashrc.sh
Last active April 19, 2023 13:58
Add to ~/.bashrc to ensure that ~/bin is in PATH if the directory exists and if not already present
# Checks if the "$HOME/bin" directory exists
if [ -d "$HOME/bin" ]; then
# If "$HOME/bin" is not in PATH then add it
case ":${PATH}:" in
*:"$HOME/bin":*)
;;
*)
export PATH="$HOME/bin:$PATH"
;;
esac
@kimsondrup
kimsondrup / props.conf
Last active July 12, 2021 11:02
Artifactory and JFrog Xray Splunk config
[jfrog:misc]
SEDCMD-jfrog_removecolorcodes = s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mM|K]//g
TRANSFORMS-set_sourcetype_jfrog_service = set_sourcetype_jfrog_service
[jfrog:service]
BREAK_ONLY_BEFORE_DATE = true
category = Application
EVAL-service_type = coalesce(case(service_type == "jfrou", "jfrpg", service_type == "jfxan", "jfxana", service_type == "jfxid", "jfxidx", service_type == "jfxps", "jfxpst"), service_type)
EVAL-trace_id = substr("0000000000000000", len(trace_id) + 1) . trace_id
EXTRACT-timestamp,service_type,log_level,trace_id,class_line_number,thread,message = ^(?<timestamp>[^ ]+) \[\s*(?<service_type>[^\s\]]*)\s*\] \[{1,2}\s*(?<log_level>[^\s\]]*)\s*\]{1,2} \[\s*(?<trace_id>[^\s\]]*)\s*\] \[(?<class_line_number>[^\]]*?)\s*\] \[(?<thread>[^\]]*?)\s*\] (?:- )?(?s)(?<message>.*)$
@kimsondrup
kimsondrup / Dockerfile
Created March 23, 2021 15:52
bitnami/nginx:1.19.8 opentracing and jaegertracing
############################################# Build image for Opentracing Builder #############################################
ARG NGINX_VERSION=1.19.8
FROM bitnami/nginx:${NGINX_VERSION} as opentracing-builder
ARG NGINX_VERSION=1.19.8
ARG NGINX_OPENTRACING=0.14.0
ARG OPENTRACING_VERSION=1.6.0
USER root
WORKDIR /