- GitHub Staff
- https://mislav.net
- @mislav
- @mislav@hachyderm.io
View git-ssh-signing.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# you must also upload the public key as signing key to https://github.com/settings/keys | |
git config --global user.signingkey '~/.ssh/id_rsa' | |
git config --global commit.gpgsign true | |
git config --global gpg.format ssh | |
# (optional) this file enables `git log --show-signature` and contains email addresses associated with public keys | |
git config --global gpg.ssh.allowedsignersfile '~/.ssh/git-signers' |
View unifi-controller-cert.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hostname="MYHOST" # set this to where the Unifi Controller is served from | |
root_ca="rootCA.pem" | |
root_ca_key="rootCA.key" | |
cert="unifi.pem" | |
cert_key="unifi.key" | |
# these don't really matter | |
csr="unifi.csr" | |
pfx_password="whatever" |
View config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ~/docker/config.json | |
{ | |
"credsStore": "desktop", | |
"credHelpers": { | |
"docker.pkg.github.com": "gh", | |
"ghcr.io": "gh" | |
} | |
} |
View keybindings.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// > Preferences: Open Keyboard Shortuts (JSON) | |
[ | |
{ | |
"key": "shift+enter", | |
"command": "go.test.cursorOrPrevious", | |
"when": "editorTextFocus && editorLangId == 'go' && !findInputFocused && !replaceActive" | |
}, | |
{ | |
"key": "ctrl+shift+enter", | |
"command": "go.test.package" |
View workflows-automerge.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto-merge | |
on: | |
pull_request: | |
types: [opened] | |
jobs: | |
automerge: | |
runs-on: ubuntu-latest |
View label-copy.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: bash label-copy.sh <source-repo> <destination-repo> <label-names>... | |
# | |
# Requirements: GitHub CLI, jq | |
# | |
# Example: | |
# brew install gh jq | |
# bash label-copy.sh owner/repo1 owner/repo2 "bug" "help wanted" "feature" | |
# | |
set -e |
View die-keystone.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First, close Google Chrome. | |
# unload the Keystone agent | |
find /Library/Launch* ~/Library/LaunchAgents -maxdepth 1 -iname 'com.google.*' | xargs -L1 launchctl unload | |
# prevent it from starting again (note: you could also back up the files by moving them elsewhere) | |
find /Library/Launch* ~/Library/LaunchAgents -maxdepth 1 -iname 'com.google.*' | xargs rm -v | |
# Warning: it's likely that running Google Chrome after this will restore these files. | |
# If it doesn't, consider that automatic Chrome updates will be DISABLED. Use at own risk. |
View gh-rename-master
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: gh-rename-master <newbranch> [<remote>] | |
# | |
# Renames the "master" branch of the current repository both locally and on GitHub. | |
# | |
# dependencies: GitHub CLI v0.10 | |
set -e | |
newbranch="${1?}" | |
remote="${2:-origin}" |
View hub-graphql-mutation.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jq -R --slurp '{query: ., variables: {input: $ARGS.named}}' \ | |
--arg name "hello-world" \ | |
--arg visibility "PRIVATE" \ | |
--arg ownerId "<ORG-NODEID>" \ | |
--arg teamId "<TEAM-NODEID>" \ | |
<<<' | |
mutation ($input: CreateRepositoryInput!) { | |
createRepository(input: $input) { | |
repository { | |
nameWithOwner |
View hub-get.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
latest-version() { | |
curl -fsi https://github.com/github/hub/releases/latest | awk -F/ '/^Location:/ {print $(NF)}' | |
} | |
HUB_VERSION="${1#v}" | |
if [ -z "$HUB_VERSION" ]; then | |
latest=$(latest-version) || true |
NewerOlder