Short (72 chars or less) summary
More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).
Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
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
yearsBetween = function(d1, d2, roundUp) { | |
// dates parsing by sugarjs | |
var d1 = Date.create(d1); | |
var d2 = Date.create(d2); | |
var range = d2.getFullYear() - d1.getFullYear(); | |
if (d2.setFullYear(1972) < d1.setFullYear(1972)) range--; | |
if (roundUp && d2.getTime() !== d1.getTime()) range++; | |
return range; |
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 | |
parentShellUser=`ps u -p $PPID | awk '{print $1}'|tail -1` | |
echo $parentShellUser |
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 | |
# it can not be executed as script because newgrp starting a new shell | |
# src: http://superuser.com/questions/272061/reload-a-linux-users-group-assignments-without-logging-out/345051#345051 | |
newGrpName=<grpName> | |
currentGrpId=`id -g` | |
exec newgrp $newGrpName | |
exec newgrp #$currentGrpId |
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
<?xml version="1.0"?> | |
<ruleset name="MyStandard"> | |
<description> | |
PSR2 with changes: | |
* tabs instead of spaces (https://gist.github.com/gsherwood/9d22f634c57f990a7c64) | |
* bracers on end of line instead new line | |
</description> | |
<!-- tabs --> | |
<arg name="tab-width" value="4"/> |