Skip to content

Instantly share code, notes, and snippets.

View cranberyxl's full-sized avatar

Andy Stanberry cranberyxl

  • Lancaster, UK
  • 15:35 (UTC +01:00)
View GitHub Profile
@cranberyxl
cranberyxl / desinty-hubot-slack.md
Last active November 3, 2015 16:36
Destiny Hubot for Slack

Destiny Slack Hubot setup

  1. Follow the basic heroku/hubot instructions here: https://gist.github.com/trey/9690729
  2. Add "slack-destiny-bot": "cranberyxl/slack-destiny-bot#search_armory" to package.json to get my fork of the bot with armory search. These will probably make their way back to the original repo eventually.
  3. Go to https://{your-slack-name}.slack.com/services/new/hubot to setup a new hubot integration
  4. Signup for a Bungie API key here: https://www.bungie.net/en/User/API
  5. Plugin the Bungie API key and the slack hubot token into heroku config
@cranberyxl
cranberyxl / git.md
Last active April 28, 2021 13:27
Useful git bash scripts

List remote branches already merged to main

git fetch origin > /dev/null; git checkout origin/main; for branch in $(git branch -a --merged | grep remotes/origin | grep -v main | grep -v 'no branch'| sed -e 's/\s*remotes\///'); do echo "${branch:7}"; done; git checkout main

Delete remote branches already merged to main

git fetch origin > /dev/null; git checkout origin/main; for branch in $(git branch -a --merged | grep remotes/origin | grep -v main | grep -v 'no branch'| sed -e 's/\s*remotes\///'); do git push origin :${branch:7}"; done; git checkout main