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
# Type(<scope>): <subject> | |
# Type: core, feat, fix, docs, style, refactor, test, chore, git, merge, composer | |
# Git Operations (Prefix with): Cherry-Pick To Develop: <cpd!>, Squash|Fixup|Skip|Split: <squash!|fixup!|skip!|split!>, Temp: <tmp!|temp!> | |
# For Cherry-Pick (Prefix with): cpick(<branch>) | |
# Scope: controllers, models, repositories | |
# Subject: (This commit) <verb: 'add, fix, delete, modify'> subject | |
# <body> |
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
@echo off | |
setlocal enabledelayedexpansion | |
SET DestinationDrive=Z | |
call :source "%~1" | |
rem echo source set to %source% from %~1 | |
call :destination "%~2" %source% | |
rem echo destination set to %destination% from %~2 and %source% |
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
@echo off | |
setlocal enabledelayedexpansion | |
SET DestinationDrive=Z | |
SET TotalDuplicated=0 | |
call :source "%~1" | |
rem echo source set to %source% from %~1 | |
call :destination "%~2" %source% | |
rem echo destination set to %destination% from %~2 and %source% |
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
@Echo off | |
REM ADD PHP TO PATH See PHP-CS-Fixer bug on https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/1253 | |
set PATH=%PATH%;"D:\DevApps\PHP5.6.6" | |
IF "%LARAVEL%"=="1" ( | |
SET LARAVEL=0 | |
echo "End commit of PHP-CS-Fixer" | |
) ELSE ( | |
SET LARAVEL=1 | |
echo "PHP-CS-Fixer" | |
"D:\DevApps\PHP5.6.6\php.exe" "%~dp0php-cs-fixer.phar" --verbose fix --config-file=.php_cs |
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
#!/bin/sh | |
# | |
# An example hook script to prepare the commit log message. | |
# Called by "git commit" with the name of the file that has the | |
# commit message, followed by the description of the commit | |
# message's source. The hook's purpose is to edit the commit | |
# message file. If the hook fails with a non-zero status, | |
# the commit is aborted. | |
# | |
# To enable this hook, rename this file to "prepare-commit-msg". |
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 | |
$finder = Symfony\Component\Finder\Finder::create() | |
->notPath('bootstrap/cache') | |
->notPath('storage') | |
->notPath('vendor') | |
->in(__DIR__) | |
->name('*.php') | |
->ignoreDotFiles(true) | |
->ignoreVCS(true); |
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
// Works withs stdClass Objects | |
static function array_change_key_case($input, $case ) | |
{ | |
$array = array_change_key_case((array)$input, $case ); | |
return (object) $array; | |
} |
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 namespace JaTubio\Testing; | |
trait DatabaseTransactions { | |
protected function getConnectionName() | |
{ | |
$model = $this->getModel(); | |
if ( null !== $model ) | |
{ |
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
### Tags | |
# Return date of tag. (To use in another alias) | |
tag-date = "!git show $1 | awk '{ if ($1 == \"Date:\") { print substr($0, index($0,$3)) }}' | tail -2 | head -1 #" | |
# Show tag message | |
tag-message = "!git show $1 | awk -v capture=0 '{ if(capture) message=message\"\\n\"$0}; BEGIN {message=\"\"}; { if ($1 == \"Date:\" && length(message)==0 ) {capture=1}; if ($1 == \"commit\" ) {capture=0} }; END { print message }' | sed '$ d' | cat -s #" | |
# Get hash of tag commit | |
tag-commit = "!git show $1 | awk '{ if ($1 == \"commit\") { print $2 }}' #" | |
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
### Files | |
# Find if one file ever had into repository | |
ff = "!git log --pretty=format: --name-status --all -M -B | sort -u | grep $1 -i #" | |
# The same as above but showing copied files | |
ffc = "!git log --pretty=format: --name-status --all -C -M -B | sort -u | grep $1 -i #" | |
# Show Untracked files on stash | |
sfu = "!git rev-list -g stash | git rev-list --stdin --max-parents=0 | xargs git show --stat" |