Skip to content

Instantly share code, notes, and snippets.

View tomdwp's full-sized avatar

Tom Daggett tomdwp

View GitHub Profile
@tomdwp
tomdwp / circle_ci_download.sh
Created June 22, 2018 23:14
This is a bash script to download the artifacts from a Circle CI job. You will need to configure with your Circle CI API token, the github account related to the Circle CI job, and the github project name.
#!/bin/bash
die () {
echo >&2 "$@"
exit 1
}
[ "$#" -eq 2 ] || die "::\tThis script downloads the output files from a Circle CI job\t::\n::\tpass the Circle CI job number as first argument\t\t\t::\n::\tpass the output folder as second argument\t::"
echo $1 | grep -E -q '^[0-9]+$' || die "::\tCircle CI build number required, [ $1 ] provided\t\t::"
if [ -d "$2" ]; then
echo " "
@tomdwp
tomdwp / .bash_profile
Last active February 8, 2018 20:07
adding git information to bash prompt on macOS
## assuming you have git installed via Homebrew
## the prompt files needed are located here: /usr/local/etc/bash_completion.d/
## first, add this to your ~/.bash_profile
source /usr/local/etc/bash_completion.d/git-prompt.sh
# another ways is: source $(brew --prefix)/etc/bash_completion.d/git-prompt.sh
## if you also want git command completion, then add this too:
source /usr/local/etc/bash_completion.d/git-completion.bash
@tomdwp
tomdwp / .gitconfig
Last active October 14, 2021 05:33 — forked from samsalisbury/.gitconfig
Git diff and merge with p4merge (macOS)
[merge]
keepBackup = false
tool = p4merge
[mergetool "p4merge"]
cmd = /Applications/p4merge.app/Contents/Resources/launchp4merge "\"$PWD/$BASE\"" "\"$PWD/$REMOTE\"" "\"$PWD/$LOCAL\"" "\"$PWD/$MERGED\""
keepTemporaries = false
trustExitCode = false
keepBackup = false
[diff]
tool = p4merge
@tomdwp
tomdwp / gist:561051943a69e334cc8d7694bb56eebd
Last active November 14, 2017 18:13 — forked from philstrong/gist:83bd14a85f7bebf7fc01
Setting up GIT Bash autocompletion. Use this only if you are using Bash instead of ZSH.
@tomdwp
tomdwp / Adding_Python_to_PATH_on_Windows.md
Last active January 11, 2016 19:24
Instructions for adding Python to your PATH on Windows

How do I set or change the PATH system variable?

The PATH is the system variable that your operating system uses to locate needed executables from the command line window.

The PATH system variable can be set using System Utility in control panel on Windows.

Setting Path on Windows

  1. Drag the Mouse pointer to the Right bottom corner of the screen where the Windows icon is and click on it if necessary.
  2. In the Search box type: Control Panel
  3. Click on -> Control Panel -> System -> Advanced