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 | |
| function curlGetHTTPCode($url) | |
| { | |
| if (function_exists('curl_init')) | |
| { | |
| $ch = curl_init($url); | |
| curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
| curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5); | |
| curl_setopt($ch, CURLOPT_TIMEOUT, 5); | |
| curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); |
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 | |
| function gitArchive($path) | |
| { | |
| if (is_dir($path)) | |
| { | |
| $dir = new DirectoryIterator($path); | |
| foreach ($dir as $fileInfo) | |
| { | |
| if($fileInfo->isDot() || $fileInfo->getFilename()[0] == '.') | |
| continue; |
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
| #!/bin/bash | |
| # Create tree path | |
| function mymv () | |
| { | |
| dir="$2" | |
| tmp="$2"; tmp="${tmp: -1}" | |
| [ "$tmp" != "/" ] && dir="$(dirname "$2")" | |
| [ ! -a "$dir" ] && | |
| mkdir -p "$dir" && |
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
| #!/bin/bash | |
| # Create tree path | |
| function mymv () | |
| { | |
| dir="$2" | |
| tmp="$2"; tmp="${tmp: -1}" | |
| [ "$tmp" != "/" ] && dir="$(dirname "$2")" | |
| [ ! -a "$dir" ] && | |
| mkdir -p "$dir" && |
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
| grep -R --color -n -A 10 -B 10 'Db::getInstance' |
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
| git clone https://github.com/mozilla/mozjpeg.git | |
| cd mozjpeg | |
| autoreconf -fiv | |
| mkdir build | |
| cd build | |
| sh ../configure | |
| make install |
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
| git clone https://github.com/pornel/pngquant.git | |
| cd pngquant | |
| ./configure | |
| make | |
| make install |
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
| wget http://skylink.dl.sourceforge.net/project/pmt/pngcrush/1.7.86/pngcrush-1.7.86.zip | |
| unzip pngcrush-1.7.86.zip && cd pcr010786/ | |
| make | |
| whereis pngcrush | |
| cp -f pngcrush /usr/bin/pngcrush | |
| cp -f pngcrush /usr/bin/X11/pngcrush |
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
| $filter = new Twig_SimpleFilter('myFunction', function (Twig_Environment $env, $param) use ($twig) { | |
| echo $twig->getCompiler()->getFilename(); | |
| }, array('needs_environment' => true)); | |
| $twig->addFilter($filter); |
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
| git clone https://github.com/kohler/gifsicle.git | |
| cd gifsicle/ | |
| ./bootstrap.sh | |
| ./configure | |
| make | |
| make install |
OlderNewer