diff options
author | Mathias Bynens <mathias@qiwi.be> | 2011-12-28 13:19:35 +0100 |
---|---|---|
committer | Mathias Bynens <mathias@qiwi.be> | 2011-12-28 13:19:35 +0100 |
commit | 6b75bfc425a1db36f83bb7a180fb73694ac3e124 (patch) | |
tree | d4b9c413ee1926173c72b2acab5fc2ca59365412 /.functions | |
parent | fad95362fbcb3b12e6e8862892c7f2323f6d340c (diff) | |
download | dotfiles-6b75bfc425a1db36f83bb7a180fb73694ac3e124.tar.gz dotfiles-6b75bfc425a1db36f83bb7a180fb73694ac3e124.tar.bz2 dotfiles-6b75bfc425a1db36f83bb7a180fb73694ac3e124.zip |
Use tabs instead of double-space indents
Diffstat (limited to '.functions')
-rw-r--r-- | .functions | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -1,32 +1,32 @@ # Create a new directory and enter it function md() { - mkdir -p "$@" && cd "$@" + mkdir -p "$@" && cd "$@" } # Test if HTTP compression (RFC 2616 + SDCH) is enabled for a given URL. # Send a fake UA string for sites that sniff it instead of using the Accept-Encoding header. (Looking at you, ajax.googleapis.com!) function httpcompression() { - encoding="$(curl -LIs -H 'User-Agent: Mozilla/5 Gecko' -H 'Accept-Encoding: gzip,deflate,compress,sdch' "$1" | grep '^Content-Encoding:')" && echo "$1 is encoded using ${encoding#* }" || echo "$1 is not using any encoding" + encoding="$(curl -LIs -H 'User-Agent: Mozilla/5 Gecko' -H 'Accept-Encoding: gzip,deflate,compress,sdch' "$1" | grep '^Content-Encoding:')" && echo "$1 is encoded using ${encoding#* }" || echo "$1 is not using any encoding" } # Syntax-highlight JSON files function json() { - python -mjson.tool <<< "$*" | pygmentize -l javascript + python -mjson.tool <<< "$*" | pygmentize -l javascript } # All the dig info function digga() { - dig +nocmd "$1" any +multiline +noall +answer + dig +nocmd "$1" any +multiline +noall +answer } # Escape UTF-8 characters into their 3-byte format function escape() { - printf "\\\x%s" $(printf "$@" | xxd -p -c1 -u) - echo # newline + printf "\\\x%s" $(printf "$@" | xxd -p -c1 -u) + echo # newline } # Decode \x{ABCD}-style Unicode escape sequences function unidecode() { - perl -e "binmode(STDOUT, ':utf8'); print \"$@\"" - echo # newline + perl -e "binmode(STDOUT, ':utf8'); print \"$@\"" + echo # newline }
\ No newline at end of file |