-
Notifications
You must be signed in to change notification settings - Fork 0
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
6de53d0
commit a4dc3d4
Showing
26 changed files
with
65 additions
and
69 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,5 @@ | ||
# Get TTY number, last 2 digits | ||
TTY_NUM=$(tty|cut -c11-) | ||
|
||
# Prevent tar include "._" file resource forks | ||
export COPYFILE_DISABLE=true |
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
File renamed without changes.
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
File renamed without changes.
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,2 @@ | ||
# Use vim | ||
export EDITOR=vim |
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,48 @@ | ||
# display file/directory permissions in octal format | ||
perms() { | ||
# default to all visible files/directories | ||
local input=* | ||
if [ ! -z "$1" ]; then | ||
input=$@ | ||
fi | ||
# check to also show hidden files/directories | ||
if [ "$1" == "-a" ]; then | ||
input=".* *" | ||
fi | ||
if [ "$(uname)" == "Darwin" ]; then | ||
stat -f '%A %N' $input 2>/dev/null | ||
else | ||
stat -c '%A %a %n' $input 2>/dev/null | ||
fi | ||
} | ||
|
||
# Repeat a command mulitple times | ||
repeat() { | ||
local n=$1 | ||
shift | ||
while [ $(( n -= 1 )) -ge 0 ] | ||
do | ||
"$@" | ||
done | ||
} | ||
|
||
# remove known_hosts entry | ||
unknow_host() { | ||
if [ -z "$1" ];then | ||
echo "error: missing hostname" | ||
return | ||
fi | ||
echo "removing host $1" | ||
ssh-keygen -R $1 &>/dev/null | ||
} | ||
|
||
# cd to parent directory of symlinked file | ||
cds() { | ||
local realpath=$(readlink $1) | ||
cd $(dirname "$realpath") | ||
} | ||
|
||
# make a directory and cd into it | ||
md() { | ||
mkdir -p "$@" && cd "$@"; | ||
} |
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
1 change: 1 addition & 0 deletions
1
source/os/Darwin/01.functions → bashrc.d/platform/osx/01.git-functions.bash
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
File renamed without changes.
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
This file was deleted.
Oops, something went wrong.