Skip to content

Instantly share code, notes, and snippets.

View carmanchris31's full-sized avatar

Christopher Carman carmanchris31

  • McGraw-Hill Education
  • United States
View GitHub Profile
@carmanchris31
carmanchris31 / .gitconfig
Last active February 29, 2024 23:42
Git base config
[core]
excludesfile = ~/.gitignore
[fetch]
prune = true
pruneTags = true
[pull]
ff = only
[rebase]
autosquash = true
[alias]
@carmanchris31
carmanchris31 / .zshrc
Last active September 22, 2023 19:24
Update go version on cd (OSX, bash@3, zsh, gimme)
gimme_after_cd() {
debug_log() {
test "$DEBUG" = "1" && echo "[debug] $1"
}
find_go_mod() {
dir=$PWD
while [ "$dir" != "/" ]; do
if [ -f "$dir/go.mod" ]; then
echo "$dir/go.mod"
// Inspired by https://medium.com/@magnusjt/ioc-container-in-nodejs-e7aea8a89600
class UserModel {
isUser(): boolean {
return true
}
}
class UserService {
constructor(private model: UserModel) {}
@carmanchris31
carmanchris31 / undelete-s3.sh
Last active January 28, 2021 21:00
Undelete S3 files in bulk
#!/bin/bash
#
# Undeletes S3 files in bulk for a provided bucket/prefix/date deleted
#
# Author: Christopher Carman
# Based on https://stackoverflow.com/a/64352685/4175944
set -e
Bucket=$1