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 | |
| # 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 ] |
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/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 [] | |
| # |
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/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) |
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
| 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()) |
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
| /** | |
| * @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 = '') { | |
NewerOlder