Skip to content

Instantly share code, notes, and snippets.

View benjaminjackson's full-sized avatar

Benjamin Jackson benjaminjackson

View GitHub Profile
{
"b": 2,
"a": 1
}
@benjaminjackson
benjaminjackson / uup.rb
Created May 13, 2017 20:44
This will ping every single user on your Slack team every time they go active with "u up?"
require 'slack-ruby-bot'
class UUpBot < SlackRubyBot::Bot
command 'yeah' do |client, data, match|
client.say(text: 'me too', channel: data.channel)
end
end
class UUpServer < SlackRubyBot::Server
on 'presence_change' do |client, message|
@benjaminjackson
benjaminjackson / docker-full-cleanup.sh
Created August 23, 2017 17:26
Nuke all docker intermediate build files to reclaim disk space
alias docker-full-cleanup='func_full-cleanup-docker'
func_full-cleanup-docker() {
echo "WARN: This will remove everything from docker: volumes, containers and images. Will you dare? [y/N] "
read choice
if [ \( "$choice" == "y" \) -o \( "$choice" == "Y" \) ]
then
sudo echo "> sudo rights check [OK]"