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
| # Remove untagged images | |
| function docker-untagged() | |
| { | |
| docker images | grep "<none>" | awk '{ print "docker rmi " $3 }' | bash | |
| } |
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
| curl -o /dev/null -w "Connect: %{time_connect} TTFB: %{time_starttransfer} Total time: %{time_total} \n" -s http://addons.prestashop.com/fr/ |
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
| Object.size = function(obj) { | |
| var size = 0, key; | |
| for (key in obj) { | |
| if (obj.hasOwnProperty(key)) size++; | |
| } | |
| return size; | |
| }; |
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
| Object.delete = function(obj) { | |
| for (var key in obj) { | |
| if (!obj.hasOwnProperty(key)) { | |
| continue; | |
| } | |
| delete obj[key]; | |
| } | |
| }; |
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
| var p = function () { | |
| var i = 0, | |
| arg_lenght = arguments.length; | |
| if (arg_lenght > 0) { | |
| for (i; i<arg_lenght; i++) { | |
| if (arguments[i] instanceof Array) { | |
| // console.log(arguments.callee.caller.toString()); | |
| console.table(arguments[i]); | |
| } else if (typeof(arguments[i]) === 'object') { | |
| if (typeof console.table == 'function') { |
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 |
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
| 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
| 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
| git clone https://github.com/mozilla/mozjpeg.git | |
| cd mozjpeg | |
| autoreconf -fiv | |
| mkdir build | |
| cd build | |
| sh ../configure | |
| make install |