Skip to content

Instantly share code, notes, and snippets.

View cbrgm's full-sized avatar
👋

Christian Bargmann cbrgm

👋
View GitHub Profile
@cbrgm
cbrgm / git_path_analysis.sh
Created December 7, 2023 21:37
git_path_analysis.sh
#!/bin/bash
# Usage: ./script_name.sh <depth> <output_limit> <pattern1> <pattern2> ...
# Example: ./script_name.sh 2 50 vendor .git tmp
# Validate and set depth
DEPTH=${1:-2}
if ! [[ "$DEPTH" =~ ^[0-9]+$ ]]; then
echo "Depth must be a positive integer."
exit 1
@cbrgm
cbrgm / main.go
Created April 29, 2022 09:32
Github Webhooks Golang
package main
import (
"fmt"
"github.com/cbrgm/githubevents/githubevents"
"github.com/google/go-github/v43/github"
"net/http"
)
func main() {
@cbrgm
cbrgm / main.go
Created April 29, 2022 09:31
Github Webhook Events in Go
package main
import (
"fmt"
"github.com/cbrgm/githubevents/githubevents"
"github.com/google/go-github/v43/github"
"net/http"
)
func main() {
@cbrgm
cbrgm / .skhdrc
Created June 16, 2021 16:32
yabai + skhd + spacebar dotfiles
####### Shortcut Hotkeys #############
# open terminal
alt - return : open -n /Applications/Alacritty.app
# restart Yabi, SpaceBar, and SKHD
alt + shift - r : \
launchctl kickstart -k "gui/${UID}/homebrew.mxcl.yabai"; \
skhd --reload
@cbrgm
cbrgm / PKGBUILD
Created May 9, 2019 22:01
PKGBUILD cuelang-cue-git
# Configure, Unify, Execute.
# CUE is an open source data constraint language which aims to simplify tasks involving defining and using data.
# It is a superset of JSON, allowing users familiar with JSON to get started quickly.
# Maintainer: Christian Bargmann <chris@cbrgm.net>
pkgname=cuelang-cue-git
pkgver=r157.ad10d9d
pkgrel=1
pkgdesc='The CUE Data Constraint Language'
@cbrgm
cbrgm / gen-kubeconfig.sh
Created April 8, 2019 10:23
Create a kubeconfig for an existing serviceaccount in kubernetes
#!/bin/bash
# your server name goes here
server=https://my.k8s.cluster:6443
# the name of the secret containing the service account token goes here
name=super-secret-token-2l269
# the namespace containing the secret
namespace=kube-system
# don't touch this!
@cbrgm
cbrgm / mangosd.conf
Last active March 22, 2019 01:03
cmangos config
#####################################
# MaNGOS Configuration file #
#####################################
[MangosdConf]
ConfVersion=2019020601
###################################################################################################################
# CONNECTIONS AND DIRECTORIES
#
################################################################################
# World server configuration #
################################################################################
[MangosdConf]
ConfVersion=2017021400
################################################################################
# CONNECTIONS AND DIRECTORIES
#
@cbrgm
cbrgm / install-ro.sh
Last active August 9, 2023 01:38
Install rAthena RagnarokOnline Server on Ubuntu 18.04
#!/bin/bash
######################################################
# Basic settings
######################################################
# server base directory
RAGNAROK_DIR=/rAthena
# mysql database settings
MYSQL_ROOT_PW="changeme"
@cbrgm
cbrgm / .zshrc
Created November 30, 2018 20:25
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/chris/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes