Skip to content

Instantly share code, notes, and snippets.

View mbolli's full-sized avatar

Michael Bolli mbolli

View GitHub Profile
@HELWATANY
HELWATANY / Webstorm64.vmoptions
Last active March 7, 2025 08:53
JetBrains Custom VM Options Configuration Optimized For High Performance... Works with all JetBrains IDEs... JDK 8.x+ Recommended....
# 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
@GaryRogers
GaryRogers / createPhar.php
Last active March 28, 2020 23:54
Create a Phar archive for PHP
<?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();
@stevegrunwell
stevegrunwell / get_current_git_commit.php
Created August 15, 2012 21:44
Get current git HEAD using PHP
<?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 {