Last active
August 29, 2015 14:01
-
-
Save alexandre-mbm/fa14cb39c72511458acf to your computer and use it in GitHub Desktop.
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
<?php | |
// se o arquivo não pode ser lido ou nao existe a função fopen retorna FALSE | |
$file = @fopen($argv[1], "r"); | |
$ca = ''; | |
// FALSE a partir do fopen irá causar um warning(aviso) e resultar em um loop infinito aqui | |
do { | |
$c = fgetc($file); | |
if($c === false) break; | |
$ca = $c; | |
} while (!feof($file)); | |
fclose($file); | |
if($ca == "\n") | |
exit(0); | |
else | |
exit(1); | |
?> |
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
alexandre$ find -type f | grep -v ".git\/" | xargs -n1 | xargs -I@ bash -c "php eof.php @ || echo @" | |
./.gitignore | |
./themes/bootstrap/README.md | |
./themes/bootstrap/assets/img/glyphicons-halflings-white.png | |
./themes/bootstrap/assets/img/glyphicons-halflings.png | |
./themes/bootstrap/assets/js/bootstrap.min.js | |
./themes/bootstrap/assets/.DS_Store | |
./themes/index.html | |
./themes/default/scripts/modernizr-2.6.1.min.js | |
./changelog.txt | |
./plugins/index.html | |
./vendor/index.html | |
./vendor/heroku/heroku-buildpack-php/.gitignore | |
./vendor/heroku/heroku-buildpack-php/conf/php/conf.d/ext-mongo.ini | |
./vendor/heroku/heroku-buildpack-php/conf/php/conf.d/ext-apcu.ini | |
./vendor/heroku/heroku-buildpack-php/conf/php/conf.d/ext-memcached.ini | |
./vendor/heroku/heroku-buildpack-php/conf/php/conf.d/ext-redis.ini | |
./vendor/heroku/heroku-buildpack-php/conf/php/conf.d/ext-imagick.ini | |
./vendor/heroku/heroku-buildpack-php/conf/nginx/heroku.conf.php | |
./vendor/heroku/heroku-buildpack-php/LICENSE | |
./vendor/heroku/heroku-buildpack-php/requirements.txt | |
./vendor/heroku/heroku-buildpack-php/bin/common.sh | |
./vendor/michelf/php-markdown/Michelf/Markdown.php | |
./vendor/michelf/php-markdown/Michelf/MarkdownExtra.php | |
./license.txt | |
./content/index.html | |
./content/404.md | |
./content/sub/index.md | |
./content/sub/page.md | |
./teste.txt | |
./lib/index.html | |
./composer.phar | |
alexandre$ |
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
alexandre$ echo >> ./content/index.html | |
alexandre$ echo >> ./content/404.md | |
alexandre$ echo >> ./content/sub/index.md | |
alexandre$ echo >> ./content/sub/page.md | |
alexandre$ git diff |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment