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
| # GNU parallel | |
| # better than xargs: http://www.gnu.org/software/parallel/ | |
| # install: (wget -O - pi.dk/3 || curl pi.dk/3/) | bash && \ | |
| # echo will cite | parallel --bibtex | |
| command -v parallel &>/dev/null | |
| if [ $? != 0 ]; then | |
| alias para='xargs' | |
| else | |
| alias para='parallel' | |
| fi |
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
| perl -pe ’s/\r\n|\n|\r/\r\n/g’ source.txt > dest.txt |
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
| Find each() and create_function() calls >= PHP 7.2 | |
| =(\W)?(each|create_function) ?\( | |
| (or look for the while/list/each construct): | |
| while\W?\(\W?list\W?\(.*=\W?each\( | |
| Find all SHORT tags >= 5.3 | |
| (.*)<\?(?!(p|x|=))(.*) |
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 | |
| /** | |
| * This file should be uploaded as: /includes/classes/observers/class.limitCartValue.php | |
| * It also requires that the config.limitCartValue.php file also be installed. See below. | |
| * Limit shopping cart total value, to mitigate against DDOS attacks | |
| */ | |
| class limitCartValue extends base { | |
| /** constructor method | |
| * Attach listeneners to events |
NewerOlder