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 | |
| /** | |
| * Quick script to extract ASINs from Amazon URLs. | |
| * | |
| * @see http://stackoverflow.com/a/12827734/70876 | |
| * | |
| * beporter at users dot sourceforge dot net | |
| * 2016-05-18 | |
| */ |
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
| #!/user/bin/env bash | |
| # $1 = file to digest | |
| # $2 = expected hash | |
| # Exits zero if the hashes match, outputs the difference if they do not and exits non-zero. | |
| diff \ | |
| <(md5 ${1?"Provide a valid file path as the first argument."} | cut -f 4 -d ' ' -) \ | |
| <(echo ${2?"Provide the expected md5 hash as the second argument."}) |
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
| #!/usr/bin/env bash | |
| #--------------------------------------------------------------------- | |
| usage () | |
| { | |
| cat <<EOT | |
| ${0##*/} | |
| Apply the belongstomany.patch file to your cakephp source in vendor/ |
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 | |
| // Make sure we see processing errors during development/testing. | |
| error_reporting(E_ALL); | |
| ini_set('display_errors', true); | |
| // Set up operating parameters. | |
| $filePattern = 'gallery/*.[jJ][pP][gG]'; | |
| $thumbPattern = 'thumbs/%s'; | |
| $targetWidth = 200; |
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
| #!/usr/bin/env bash | |
| # beporter@users.sourceforge.net | |
| #--------------------------------------------------------------------- | |
| usage () | |
| { | |
| cat <<EOT | |
| ${0##*/} | |
| Wrapper around composer to make it "aware" of a custom |
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 | |
| /** | |
| * A command line script to grab the "week-by-week" updates from | |
| * TheBump.com's API and save them to local .html files. | |
| * | |
| * Tries to be respectful and cache all results to avoid unecessary HTTP | |
| * calls. Uses the API key that thebump.com's own website uses. No malice | |
| * is intended by this. | |
| * | |
| * Usage: |
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
| #!/usr/bin/env bash | |
| # | |
| #--------------------------------------------------------------------- | |
| usage () | |
| { | |
| cat <<EOT | |
| ${0##*/} | |
| Wraps up the commands required to dump a SourceForge CVS repo |
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
| #!/usr/bin/env bash | |
| # | |
| # Find and list all git repos (folders containing .git/ directories) | |
| # in the provided path (defaults to current dir.) | |
| # | |
| # Designed to run on a Mac, so make sure you have GNU `findutils` | |
| # and the `terminal-notifier` gem installed. | |
| # | |
| # beporter@users.sourceforge.net | |
| # v1.0 2015-08-10 |
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
| #!/usr/bin/env bash | |
| # | |
| # https://gist.github.com/beporter/8074237fa5a71f77dc5c | |
| # beporter@users.sourceforge.net | |
| # 2015-09-14 | |
| #--------------------------------------------------------------------- | |
| usage () | |
| { |
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
| #!/usr/bin/env bash | |
| # Allows you to test the create-project process using your local | |
| # checked-out copy of the skeleton as the source. You MUST commit the | |
| # changes you want to test to a git branch! You MUST name that branch | |
| # as the first argument and the destination path to set up the fresh | |
| # copy into as the second. | |
| # | |
| # Usage: | |
| # - Place this script in your package's root directory and make it executable. | |
| # - Set the PACKAGE_NAME variable below to match your composer.json's `name`. |