- New deployment
rsync -azv --stats --progress . -e ssh user@host:/path/to/vhost/ --exclude=".git" --exclude-from=".gitignore"
- Notice bad code, locally revert changes, or fix and commit.
git reset --hard HEAD@SHA1
- Sync working copy again
| /** | |
| * @param $file Path to source file | |
| * @param $dest Path to save the image | |
| * @param $type Method of resizing ('resize', 'resizemin', 'resizecrop', 'crop') | |
| * @param $size Dimensions, array of width and height or maxScale | |
| * @param $output Type of file to save it as ('jpg', 'png', 'gif') | |
| * @param $quality 0 < x < 100 | |
| */ | |
| function image ($file, $dest, $type, $size, $output = NULL, $quality = NULL, &$error = '') { | |
| function request($data , $retry = 1) | |
| { | |
| //Configure::write('debug' , 2); | |
| $start_time_unix = time(); | |
| $max_time_unix = time() + $this->request_timeout; | |
| $success = false; | |
| // Are there any servers left to try ??? | |
| if(false != $this->select_server()) |
| #!/bin/bash | |
| unset GIT_DIR | |
| cd /path/to/project | |
| # Get our info.... | |
| LATEST_TAG=$(git describe --tags --abbrev=0) | |
| CURRENT_REVISION=$(git describe) | |
| NUMBER_FILES_CHANGED=$(git diff --name-only HEAD $LATEST_TAG | wc -l) | |
| #FILES_CHANGED=$(git diff --name-only HEAD $LATEST_TAG) |
| #!/bin/bash | |
| # For recursive operation, I saved the script below to this location: "/usr/local/bin/symtohard". | |
| # Any directory in your $PATH will work just fine. After putting it there, make sure to run: | |
| # | |
| # chmod +x /usr/local/bin/symtohard | |
| # | |
| # Converts all symbolic links in a directory to hard links. See http://ubuntuforums.org/showthread.php?t=1508728 for any updates/problems. | |
| # | |
| # Run via cmd below without [] | |
| # |
| #!/bin/sh | |
| # Via http://www.unix.com/shell-programming-scripting/100979-folder-watch.html | |
| DIR=foo | |
| STATIC=contents | |
| ls -al $DIR > contents.tmp | |
| diff -q contents.tmp $STATIC | |
| if [ ! $? -eq 0 ] |
| #!/bin/bash | |
| #set -x | |
| # Shows you the largest objects in your repo's pack file. | |
| # Written for osx. | |
| # | |
| # @see http://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/ | |
| # @author Antony Stubbs | |
| # set the internal field spereator to line break, so that we can iterate easily over the verify-pack output |
| <?php | |
| /** | |
| * Reading : | |
| * | |
| * - http://www.craftitonline.com/2011/08/behat-symfony-2-secret-how-to-subcontext-minkcontext/ | |
| * - http://www.craftitonline.com/2011/07/behat-mink-new-use-of-aliased-subcontexts-complex-step-chaining/ | |
| * - http://davidwinter.me/articles/2012/01/14/testing-javascript-websites-with-behat/ | |
| * - http://davidwinter.me/articles/2012/01/13/using-behat-with-mink/ | |
| */ | |
| use Behat\Behat\Context\ClosuredContextInterface, |
rsync -azv --stats --progress . -e ssh user@host:/path/to/vhost/ --exclude=".git" --exclude-from=".gitignore"
git reset --hard HEAD@SHA1
| <?php | |
| /** | |
| * Shortcut shell to the CakeDC Migrations plugin | |
| * Plugin : | |
| * git submodule add https://github.com/CakeDC/migrations.git app/Plugin/Migrations | |
| * Install this file: | |
| * app/Console/Command | |
| * Usage: | |
| * cake migrate [subcommand] [-h] [-v] [-q] | |
| * |
| <?php | |
| /** | |
| * Shortcut shell for easy fixtures | |
| * | |
| * Plugin/s : | |
| * git submodule add git@github.com:FloatingPoints/Resources.git app/Plugin/Resources | |
| * Install this file: | |
| * app/Console/Command | |
| * Usage: | |
| * cake fixture [subcommand] [-h] [-v] [-q] |