Skip to content

Instantly share code, notes, and snippets.

View mebowler's full-sized avatar

Michael Bowler mebowler

View GitHub Profile
@mebowler
mebowler / docker_cleanup.fish
Last active August 16, 2019 14:56
Docker Cleanup Fish Functions
function dri
echo 'docker rmi (docker images -q) -f'
docker rmi (docker images -q) -f
end
function dre
echo 'docker rm $(docker ps -q -f 'status=exited')'
docker rm (docker ps -q -f 'status=exited')
end
@mebowler
mebowler / uuid.fish
Created June 3, 2019 14:35
MacOS Fish function to generate UUIDs
function uuid
set -lx UUID (uuidgen | awk '{printf("%s", tolower($0));}')
printf $UUID | pbcopy
echo "$UUID copied to clipboard."
end
@mebowler
mebowler / dict_switch.ipynb
Last active June 17, 2019 13:34
Python Dictionaries as Switch Statements
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mebowler
mebowler / consumer.groovy
Last active July 7, 2020 17:34
Kafka Producer/Consumer Reconciliation - Useful for testing cluster reconfiguration ensuring no lost messages.
#!/usr/bin/env groovy
@Grapes([
@Grab('com.h2database:h2:1.3.176'),
@Grab('org.apache.kafka:kafka_2.11:0.10.2.0'),
@GrabConfig(systemClassLoader=true)
])
import java.sql.*
import groovy.sql.Sql