This commit is contained in:
Gregory Eremin
2013-05-23 13:17:40 +04:00
parent 29bc4bc769
commit 7829058f8e
27 changed files with 655 additions and 104 deletions
-28
View File
@@ -1,28 +0,0 @@
# credit: http://nparikh.org/notes/zshrc.txt
# Usage: smartextract <file>
# Description: extracts archived files / mounts disk images
# Note: .dmg/hdiutil is Mac OS X-specific.
extract () {
if [ -f $1 ]; then
case $1 in
*.tar.bz2) tar -jxvf $1 ;;
*.tar.gz) tar -zxvf $1 ;;
*.bz2) bunzip2 $1 ;;
*.dmg) hdiutil mount $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar -xvf $1 ;;
*.tbz2) tar -jxvf $1 ;;
*.tgz) tar -zxvf $1 ;;
*.zip) unzip $1 ;;
*.ZIP) unzip $1 ;;
*.pax) cat $1 | pax -r ;;
*.pax.Z) uncompress $1 --stdout | pax -r ;;
*.Z) uncompress $1 ;;
*) echo "'$1' cannot be extracted/mounted via smartextract()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}
-17
View File
@@ -1,17 +0,0 @@
# I'm just unable to remember this shit
# Taken from http://www.analysisandsolutions.com/code/chmod.htm
chmod-help () {
echo "\
+---+-----+-------------------------+
| 0 | --- | no access |
| 1 | --x | only execute |
| 2 | -w- | only write |
| 3 | -wx | write and execute |
| 4 | r-- | only read |
| 5 | r-x | read and execute |
| 6 | rw- | read and write |
| 7 | rwx | read, write and execute |
+---+-----+-------------------------+\
"
}
-3
View File
@@ -1,3 +0,0 @@
dock-delay() {
defaults write com.apple.Dock autohide-delay -float $1 && killall Dock
}
-3
View File
@@ -1,3 +0,0 @@
show-colors() {
for code in {000..255}; do print -P -- "$code: %F{$code}Lorem ipsum dolor sit amet%f"; done
}