Skip to content

Instantly share code, notes, and snippets.

View aCampello's full-sized avatar
👋

Antonio Campello aCampello

👋
View GitHub Profile
#!/bin/bash
lsof -t -i tcp:$1 | xargs kill
echo "Killed ${1}"
@aCampello
aCampello / slack.sh
Last active May 15, 2021 15:42
Slack notifications for command lines
#!/usr/bin/env bash
# Do not send slack message if command fails
set -e
COMMAND=`echo $@`
curl -X POST -H 'Content-type: application/json' --data "{'text': 'Hi <$SLACK_USER>, your command \`${COMMAND}\` has started running'}" $SLACK_HOOK
$@

Keybase proof

I hereby claim:

  • I am acampello on github.
  • I am acampello (https://keybase.io/acampello) on keybase.
  • I have a public key ASC_ot9Bc1nDQGxWM8QFZU31425D2rFQ6TWOnsk1W13xewo

To claim this, I am signing this object: