Skip to content

Instantly share code, notes, and snippets.

View tomaszwro's full-sized avatar

Tomasz Wróbel tomaszwro

View GitHub Profile
@tomaszwro
tomaszwro / discord-to-slack-bot.rb
Created February 19, 2021 08:34
Discord-to-Slack bot
require "discordrb"
require "httparty"
def notify_slack(message)
HTTParty.post(
"https://hooks.slack.com/services/xxx/xxxx/xxxxx",
body: JSON.dump({ text: message }),
headers: { "Content-Type" => "application/json" }
)
end
@tomaszwro
tomaszwro / multigit.sh
Last active February 24, 2017 09:36
multigit - bash functions to replicate a command on multiple sibling repos
# add to ~/.bash_profile
multigit() { find .. -maxdepth 2 -mindepth 2 -type d -name ".git" -exec dirname {} \; | while read repodir; do echo "-- REPO: $repodir"; git -C $repodir $*; done; }
mgs() { multigit status -s; }