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/bash | |
# delete merged local branches | |
days=90 | |
found=0 | |
# preview | |
# git branch --merged | grep -v -E "\\*|\bmaster\b|\bmain\b|\bdevelopment\b" | xargs -r -n 1 | |
# list branches merged |
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
# Configuration directory | |
# idea.config.path=%APPDATA%\JetBrains\<product><version> | |
# Plugins directory | |
#idea.plugins.path=%APPDATA%\JetBrains\<product><version>\plugins | |
# System directory | |
#idea.system.path=%LOCALAPPDATA%\JetBrains\<product><version> | |
idea.system.path=R:/intellij |
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 bash | |
# commit message file | |
commit_msg_file="$1" | |
valid_comment_prefix="^#?[0-9]{6,10} .+" | |
error() | |
{ |
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 bash | |
# commit message file | |
commit_msg_file="$1" | |
# condition the commit is invoked; none (git commit), message (git commit -m <msg>), template, merge, squash, or commit | |
# commit_source=$2 | |
# commit hash | |
# sha1=$3 | |
local_branch="$(git rev-parse --abbrev-ref HEAD)" |
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 bash | |
local_branch="$(git rev-parse --abbrev-ref HEAD)" | |
# valid_branch_regex="^(feature|bugfix|improvement|library|prerelease|release|hotfix)\/[a-z0-9._-]+$" | |
valid_branch_regex="^#?[0-9]{6,10}-[a-zA-Z]+$" | |
error() | |
{ | |
echo "GIT PRE-COMMIT HOOK ERROR:" |
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
# change me vars | |
ec2_name="ec2namechangeme" | |
# use vim | |
export EDITOR=vim | |
alias vi="vim" | |
# allow tab auto complete w/ sudo | |
if [[ "$HOME" == "/home/ec2-user" ]]; then |
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\Traits; | |
trait Stats | |
{ | |
private $timer_start; | |
private $timer_finish; | |
public function statsTimerStart() |
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 | |
if (PHP_SAPI != 'cli') { | |
exit("CLI only"); | |
} | |
if (empty($argv) || count($argv) < 2) { | |
exit("Missing route for CLI"); | |
} |
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/bash | |
# display motd on login, or sudo su - user as that is a login | |
# sudo vim /etc/profile.d/login_stats.sh | |
motd(){ | |
SERVER="server-name - aws ec2" | |
# 15:52:46 up 13 days, 5:27, 1 user, load average: 0.00, 0.00, 0.00 |
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
-server | |
-ea | |
-Xms1024m | |
-Xmx2048m | |
-XX:ReservedCodeCacheSize=1024m | |
-Deditor.maximize.on.double.click=false | |
-Dfile.encoding=UTF-8 |
NewerOlder