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/sh | |
if [ "$#" -lt 2 ]; then | |
echo "Too few arguments\n" | |
echo "Usage: $0 'PATH TO INTELLIJ IDEA APP' 'PATH_VALUE'" >&2 | |
exit 1 | |
fi | |
if [ "$#" -gt 2 ]; then | |
echo "Too many arguments\n" | |
echo "Usage: $0 'PATH TO INTELLIJ IDEA APP' 'PATH_VALUE'" >&2 |
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
# source: http://superuser.com/a/692131/424541 | |
on is_running(appName) | |
tell application "System Events" to (name of processes) contains appName | |
end is_running | |
set chromeRunning to is_running("Google Chrome") | |
if chromeRunning then | |
tell application "Google Chrome" | |
set i to 0 |
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
.PHONY: # add tasks here to avoid timestamp checks | |
default: help | |
# Based on https://gist.github.com/prwhite/8168133#comment-1313022 | |
## Another dummy task | |
dummy-task: | |
echo dummy | |
## This help screen |
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
function git() { | |
for i do | |
lastArgument=$i # last argument can be the directory or the repository url | |
done | |
/usr/local/bin/git $@ | |
if [[ $? -eq 0 ]] # only show prompt if git command was successful | |
then |
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 | |
# bash prompt which asks for email address | |
# to configure for current git repository | |
# set your available emails | |
MAILS=(private@example.com work@example.com phd@example.com) | |
# prompt for email | |
echo |
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 | |
# credits: http://agateau.com/2014/template-for-shell-based-command-line-scripts/ | |
PROGNAME=$(basename $0) | |
foo="" | |
bar="" | |
delete=0 | |
output="-" |