-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c1f830b
commit 784e90d
Showing
5 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# vim: set ts=4 sw=4 tw=80 ft=zsh et : | ||
# Ever pasted "$ somecommand" into the terminal and gotten this error? | ||
# -bash: $: command not found | ||
|
||
# Begone, silly errors! Lazy copy + paste forever!! ETCETERA!!!! | ||
# | ||
|
||
unalias $ 2> /dev/null | ||
|
||
echo 'Quit pasting in commands from the internet, you lazy bum.' | ||
"$@" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# vim: set ts=4 sw=4 tw=80 ft=zsh et : | ||
# Simple tool to remove a git repo from somewhere. Just run `git deinit` | ||
|
||
unalias unixtime 2> /dev/null | ||
|
||
REPO_PATH=$(git rev-parse --show-toplevel) | ||
|
||
if [[ -d "${REPO_PATH}/.git" ]]; then | ||
read -p "De-initialize this git repo? [y/N]" -n 1 -r | ||
if [[ $REPLY =~ ^[Yy]$ ]]; then | ||
echo | ||
echo "Removing ${REPO_PATH}/.git…" | ||
rm -rf "${REPO_PATH}/.git" | ||
echo "Done ✓" | ||
else | ||
echo "Aborting…" | ||
fi | ||
else | ||
echo "Not in a git repository" | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# vim: set ts=4 sw=4 tw=80 ft=zsh et : | ||
# Delete all git remote tags | ||
|
||
unalias git-delete-tags 2> /dev/null | ||
|
||
# Exit if git is not installed | ||
(( $+commands[git] )) || return 0 | ||
|
||
# Taken from https://gist.github.com/okunishinishi/9424779 | ||
|
||
#Delete local tags. | ||
git tag -l | xargs git tag -d | ||
#Fetch remote tags. | ||
git fetch | ||
#Delete remote tags. | ||
git tag -l | xargs git push --delete origin | ||
#Delete local tags. | ||
git tag -l | xargs git tag -d |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# vim: set ts=4 sw=4 tw=80 ft=zsh et : | ||
# Nukes a branch locally and on the origin remote. | ||
|
||
unalias git-nuke 2> /dev/null | ||
|
||
# Exit if git is not installed | ||
(( $+commands[git] )) || return 0 | ||
|
||
if [[ -z "$1" ]]; then | ||
echo "USAGE: git-nuke Branch name" | ||
return 1 | ||
fi | ||
|
||
git branch -D "$1" | ||
git push origin :"$1" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# vim: set ts=4 sw=4 tw=80 ft=zsh et : | ||
# Kills all processes running on the specified port (e.g. 'killport 8080') | ||
|
||
unalias killport 2> /dev/null | ||
|
||
# Exit if git is not installed | ||
(( $+commands[awk] )) || return 0 | ||
|
||
if [[ -z "$1" ]]; then | ||
echo "USAGE: killport PORT" | ||
return 1 | ||
fi | ||
|
||
|
||
lsof -i tcp:"$1" | awk '(NR!=1) && ($1!="Google") && ($1!="firefox") {print $2}' | xargs kill |