-
-
Save slvdrvlc/b55da9df34dfcee9f6c9abdf58a2cb6d to your computer and use it in GitHub Desktop.
Revisions
-
vhbsouza revised this gist
Apr 22, 2016 . 2 changed files with 31 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -37,7 +37,7 @@ # http://davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/ * text=auto # Documents (about ASTEXTPLAIN: http://stackoverflow.com/questions/28146244/what-is-the-difference-between-diff-and-diff-astextplain) *.doc diff=astextplain *.DOC diff=astextplain *.docx diff=astextplain This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ #!/bin/sh -e # minimalistic replacement for `run-mailcap --action=cat <file>` if test "$#" != 1 ; then echo "Usage: astextplain <file>" 1>&2 exit 1 fi # XXX output encoding (UTF-8) hardcoded case "$1" in *.doc | *.DOC | *.dot | *.DOT) antiword -m UTF-8 "$1" || cat "$1" ;; *.docx | *.DOCX) docx2txt "$1" - ;; *.pdf | *.PDF) pdftotext -layout "$1" -enc UTF-8 - ;; # TODO add rtf support *.rtf | *.RTF) cat "$1" ;; *) echo "E: unsupported filetype $1" 1>&2 exit 1 ;; esac exit 0 -
kenlimmj created this gist
Apr 18, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,50 @@ # Encrypt the repository # Remove/modify this line if the repository is meant to be open-source *.* filter=git-crypt diff=git-crypt .gitattributes !filter !diff # These files are text and should be normalized (Convert crlf => lf) *.php text *.css text *.js text *.htm text *.html text *.xml text *.txt text *.ini text *.inc text .htaccess text # These files are binary and should be left untouched # (binary is a macro for -text -diff) *.png binary *.jpg binary *.jpeg binary *.gif binary *.ico binary *.mov binary *.mp4 binary *.mp3 binary *.flv binary *.fla binary *.swf binary *.gz binary *.zip binary *.7z binary *.ttf binary # Auto detect text files and perform LF normalization # http://davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/ * text=auto # Documents *.doc diff=astextplain *.DOC diff=astextplain *.docx diff=astextplain *.DOCX diff=astextplain *.dot diff=astextplain *.DOT diff=astextplain *.pdf diff=astextplain *.PDF diff=astextplain *.rtf diff=astextplain *.RTF diff=astextplain