Skip to content

Instantly share code, notes, and snippets.

View afjoseph's full-sized avatar

Abdullah Joseph afjoseph

View GitHub Profile
@afjoseph
afjoseph / go.md
Last active April 16, 2023 09:56
Manage different Go versions

Managing Different Go Versions on an OSX machine

Put this in your .bashrc/.zshrc

changego() {
    if ! which $1 > /dev/null; then
      echo "$1 is not installed. See this https://gist.github.com/afjoseph/90218a0cc753219cf5f07aaab28454c5"
      return
    fi
@afjoseph
afjoseph / delete_gh_issues.py
Last active July 6, 2019 09:14
Empty a GitHub repo from issues using a headless Firefox browser
"""
Selenium script to recursively delete issues from a GH repo
WARNING: this WILL delete all an issues repos indiscriminately. DO NOT USE ON PRODUCTION REPOS!
TODO:
- Script only does one page at a time. It should be run after a page has been emptied out
Usage:
# Make a Firefox profile that is logged-in to GitHub
@afjoseph
afjoseph / stupid-spotlight.sh
Created October 19, 2017 07:32
When spotlight indexing turns to shit...
#!/bin/sh
# Reference: https://apple.stackexchange.com/questions/62715/applications-dont-show-up-in-spotlight
sudo mdutil -a -i off
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
sudo mdutil -a -i on /