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
/composer.lock -merge diff=composer.lock |
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 | |
/** | |
* GitHub webhook handler template. | |
* | |
* @see https://docs.github.com/webhooks/ | |
* @author Miloslav Hůla (https://github.com/milo) | |
*/ | |
$hookSecret = 's.e.c.r.e.t'; # set NULL to disable check |
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
phpunit --log-json php://stdout unit/ | awk '$NF ~ '/,/' && $1 ~ /"(test|time)"/' | cut -d: -f2- | sed "N;s/\n/--/" | sed "s/,//"| awk 'BEGIN{FS="--"}; {print $2 $1}' | sort -r | head -n 20 |
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 | |
class AdminerColors | |
{ | |
function head() | |
{ | |
static $colors = array( | |
'127.0.0.1' => '#ED1C24', | |
'localhost' => '#009245', |
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 | |
# Put this file at: .git/hooks/post-checkout | |
# and make it executable | |
# You can install it system wide too, see http://stackoverflow.com/a/2293578/685587 | |
PREV_COMMIT=$1 | |
POST_COMMIT=$2 | |
NOCOLOR='\e[0m' |
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 | |
array_reduce( | |
$objects, // array of objects, arrays... | |
function ($array, $item) { | |
$array[$item->getId()] = $item; // $item is current element | |
return $array; // $array is whole array that will be returned | |
}, | |
array() // begin with empty array - strict standards | |
); |
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
# used by Git (commit messages, rebase, ...) | |
export EDITOR=vim |
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
export PS1="$PS1\$(\ | |
export GIT_BRANCH=\"\$(git branch --no-color 2>/dev/null | grep '*' | cut -d\" \" -f2-)\"; \ | |
if [ -n \"\$GIT_BRANCH\" ] ; then \ | |
echo -en \"\[\033[01;33m\]\"\$GIT_BRANCH \"> \[\033[00m\]\"; \ | |
fi \ | |
)" |