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
#!/usr/bin/env python | |
# https://gist.github.com/kevindb/a360c8e90bcdf6364f1523a5787c8d89 | |
import sys, re | |
from subprocess import check_output | |
commit_msg_filepath = sys.argv[1] | |
branch = check_output(['git', 'branch', '--show-current']) |
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 App\Enums; | |
use Illuminate\Support\Arr; | |
use Spatie\Enum\Laravel\Enum as BaseEnum; | |
class Enum extends BaseEnum | |
{ | |
public static function getValues(): 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
component displayname="exception" output=false { | |
public struct function handleException( | |
required exception, | |
boolean log = true, | |
numeric loadTime = 0 | |
){ | |
transaction action="rollback"; | |
local.trace = this.getTrace(arguments.exception); |
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
CREATE FUNCTION [dbo].[f_truncateWithEllipsis] | |
( | |
@value VARCHAR(8000), | |
@maxLength INT | |
) | |
RETURNS VARCHAR(8000) | |
AS | |
BEGIN | |
SET @value = LTRIM(RTRIM(@value)); |
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
CREATE FUNCTION [dbo].[f_nullForBlank] | |
( | |
@value VARCHAR(8000) | |
) | |
RETURNS VARCHAR(8000) | |
AS | |
BEGIN | |
RETURN NULLIF(LTRIM(RTRIM(@value)), '') | |
END |
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
component { | |
public array function sort ( | |
required array arr, | |
numeric pos = 1 | |
) { | |
local.nextPos = arguments.pos + 1; | |
if (arguments.arr[arguments.pos] > arguments.arr[local.nextPos]) { | |
local.tempLeft = arguments.arr[arguments.pos]; | |
arguments.arr[arguments.pos] = arguments.arr[local.nextPos]; |
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
/*--------------------------------------------------------------------------------------- | |
Blog Entry: | |
Looping Over ColdFusion JSON Queries In jQuery | |
Author: | |
Ben Nadel / Kinky Solutions | |
Link: | |
http://www.bennadel.com/index.cfm?event=blog.view&id=1755 |
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
git diff --shortstat `git hash-object -t tree /dev/null` |
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
git config --global alias.lg "log --oneline --decorate --all --graph" | |
git config --global alias.s "status -s" |
NewerOlder