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
| # Copy and paste this to PowerSell | |
| $dir = "path_input" | |
| $images = Get-ChildItem $dir | |
| foreach ($img in $images) { | |
| $outputName = 'path_output' + $img.BaseName + ".webp" | |
| cwebp $img.FullName -q 100 -alpha_q 100 -m 6 -o $outputName | |
| } |
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/sh | |
| # Install pre-requisites | |
| apt-get install build-essential software-properties-common libjpeg-dev libtiff5-dev libpng-dev --fix-missing | |
| # Download from SourceForge | |
| wget --no-cookies --timestamping https://excellmedia.dl.sourceforge.net/project/graphicsmagick/graphicsmagick/1.3.34/GraphicsMagick-1.3.34.tar.gz --directory /tmp | |
| # Decompress package into /opt/graphicsmagick | |
| if [ ! -d "/opt/graphicsmagick/src" ]; then |
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
| pragma solidity 0.4.25; | |
| library SafeMath { | |
| int256 constant private INT256_MIN = -2**255; | |
| /** | |
| * @dev Multiplies two unsigned integers, reverts on overflow. | |
| */ | |
| function mul(uint256 a, uint256 b) internal pure returns (uint256) { | |
| // Gas optimization: this is cheaper than requiring 'a' not being zero, but the |