This file contains 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
# Make sure to modify "-Xms", "Xmx", "CICompilerCount", and "ParallelGCThreads" according to your PC hardware configuration... | |
##################### | |
# Default VM Options | |
##################### | |
# default value is 128m | |
-Xms1024m | |
# default value is 750m | |
-Xmx4096m | |
# default value is 512m |
This file contains 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 | |
# Create an executable phar | |
# Name of our archive. | |
$phar = new Phar("myscript.phar"); | |
# Have to do buffering to make things executable. | |
# See http://stackoverflow.com/questions/11082337/how-to-make-an-executable-phar | |
$phar->startBuffering(); |
This file contains 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 | |
/** | |
* Get the hash of the current git HEAD | |
* @param str $branch The git branch to check | |
* @return mixed Either the hash or a boolean false | |
*/ | |
function get_current_git_commit( $branch='master' ) { | |
if ( $hash = file_get_contents( sprintf( '.git/refs/heads/%s', $branch ) ) ) { | |
return $hash; | |
} else { |