Skip to content

Instantly share code, notes, and snippets.

Avatar

Anthony Gore anthonygore

View GitHub Profile
@anthonygore
anthonygore / printgitremote.sh
Created Nov 9, 2020
Bash script to print out the git remote of every subdirectory in the folder
View printgitremote.sh
find . -maxdepth 1 -mindepth 1 -type d | while read dir; do
if [ -e $dir/.git ];
then
git -C $dir remote -v
fi
done
@anthonygore
anthonygore / slack.js
Last active Aug 12, 2017
Send users a welcome message (IM) from the slackbot when they join your Slack team. Uses https://github.com/smallwins/slack so look at that first. Load this somewhere in a running Node JS app.
View slack.js
var slack = require('slack');
var bot = slack.rtm.client();
var token = "your_slack_token";
bot.team_join(function(obj) {
console.log("Team join triggered");
slack.chat.postMessage(
{
token: token,
channel: obj.user.id,