javahome() {
unset JAVA_HOME
export JAVA_HOME=$(/usr/libexec/java_home -v "$1");
java -version
}
alias j1.8='javahome 1.8'
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 | |
# http://redsymbol.net/articles/unofficial-bash-strict-mode/ | |
set -euo pipefail | |
IFS=$'\n\t' | |
################################### | |
# BREW uninstall script for osx_bootstrap.sh script | |
################################### | |
SUDO_USER=$(whoami) |
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 | |
# http://redsymbol.net/articles/unofficial-bash-strict-mode/ | |
set -euo pipefail | |
IFS=$'\n\t' | |
# inspired by | |
# https://gist.github.com/codeinthehole/26b37efa67041e1307db | |
# https://github.com/why-jay/osx-init/blob/master/install.sh | |
# https://github.com/timsutton/osx-vm-templates/blob/master/scripts/xcode-cli-tools.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
query FindRepoID { | |
repository(owner:"[github user or org]", name:"[repository]"){ | |
id, | |
isArchived, | |
} | |
} |
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
{ | |
"query": "query ($org: String!, $repo: String!) {repository(owner: $org, name: $repo) { id isArchived } }", | |
"variables": { | |
"org": "[github user or org]", | |
"repo": "[repository]" | |
} | |
} |
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
{ | |
"query": "mutation UnArchiveRepository ($mutationId: String!, $repoID: String!) {unarchiveRepository(input:{clientMutationId:$mutationId, repositoryId:$repoID}) {repository { isArchived, description } } }", | |
"variables": { | |
"mutationId": "true", | |
"repoID": "[repo id]" | |
} | |
} |
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
{ | |
"query": "mutation ArchiveRepository ($mutationId: String!, $repoID: String!) {archiveRepository(input:{clientMutationId:$mutationId, repositoryId:$repoID}) {repository { isArchived, description } } }", | |
"variables": { | |
"mutationId": "true", | |
"repoID": "[repo id]" | |
} | |
} |
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
mutation UnArchiveRepository { | |
unarchiveRepository(input:{clientMutationId:"true",repositoryId:"[insert ID]"}) { | |
repository { | |
isArchived, | |
description | |
} | |
} | |
} |
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
mutation ArchiveRepository { | |
archiveRepository(input:{clientMutationId:"true",repositoryId:"[repositoryID]"}) { | |
repository { | |
isArchived, | |
description, | |
} | |
} | |
} |
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
query FindRepoID($name: String!, $owner: String!) { | |
repository(owner: $owner, name: $name) { | |
id, | |
isArchived | |
} | |
} |