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 characters
| <?php | |
| // Set content type and disable encoding | |
| header('Content-Type: text/html; charset=UTF-8'); | |
| while (@ob_get_level()) ob_end_flush(); | |
| ob_start(); | |
| // Send some content | |
| function padding () { |
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 characters
| ------------------------------------------------------------------------- | |
| USEFUL ONE-LINE SCRIPTS FOR SED (Unix stream editor) Dec. 29, 2005 | |
| Compiled by Eric Pement - pemente[at]northpark[dot]edu version 5.5 | |
| Latest version of this file (in English) is usually at: | |
| http://sed.sourceforge.net/sed1line.txt | |
| http://www.pement.org/sed/sed1line.txt | |
| This file will also available in other languages: | |
| Chinese - http://sed.sourceforge.net/sed1line_zh-CN.html |
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 characters
| ------------------------------------------------------------------------- | |
| USEFUL ONE-LINE SCRIPTS FOR SED (Unix stream editor) Dec. 29, 2005 | |
| Compiled by Eric Pement - pemente[at]northpark[dot]edu version 5.5 | |
| Latest version of this file (in English) is usually at: | |
| http://sed.sourceforge.net/sed1line.txt | |
| http://www.pement.org/sed/sed1line.txt | |
| This file will also available in other languages: | |
| Chinese - http://sed.sourceforge.net/sed1line_zh-CN.html |
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 characters
| function tabs_or_spaces () { | |
| spaces = $(grep -P '^ *' "$@" | wc -l); | |
| tabs = $(grep -P '^\t' "$@" | wc -l); | |
| echo "Number of Spaces: $spaces" | |
| echo "Number of Tabs: $tabs" | |
| } |
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 characters
| # add-whitespace-only.bash | |
| for fname in $(git diff --name-only --diff-filter=ACMR --full-index HEAD) | |
| do | |
| diff=$(git diff -w --ignore-blank-lines --exit-code $fname) | |
| if [ $? -eq 0 ]; then | |
| echo "only whitespace diff on $fname ! adding to git..." | |
| git add $fname | |
| else | |
| echo "diff on $fname!" | |
| fi |
OlderNewer