- inquirer
- commander
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
const sleep = (ms: number) => { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
}; | |
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
function snakeToCamel(str){ | |
return str.toLowerCase() | |
// Replaces any - or _ characters with a space | |
.replace( /[-_]+/g, ' ') | |
// Removes any non alphanumeric characters | |
.replace( /[^\w\s]/g, '') | |
// Uppercases the first character in each group immediately following a space | |
// (delimited by spaces) | |
.replace( / (.)/g, function($1) { return $1.toUpperCase(); }) | |
// Removes spaces |
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
## | |
[alias] | |
co = checkout | |
cob = checkout -B | |
fp = fetch --prune | |
# log commands | |
lsg = log --all --graph --oneline --decorate | |
ls = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short |
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
# Currently in .git/hooks. Also check .git_template/ | |
#!/bin/bash | |
# This way you can customize which branches should be skipped when | |
# prepending commit message. | |
if [ -z "$BRANCHES_TO_SKIP" ]; then | |
BRANCHES_TO_SKIP=(master develop test) | |
fi | |
BRANCH_NAME=$(git symbolic-ref --short 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
var x = People[0].Address.City; | |
// oops! Null reference exception. Need to replace with. . . | |
string x = string.Empty; | |
if(People != null) { | |
var p = People[0]; | |
if (p != null) { | |
var a = p.Address; | |
if (a != null) { | |
x = a.City; |
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
public class CurrentSession { | |
public CurrentSession() { | |
CreateDate = DateTime.Now; | |
} | |
public DateTime CreateDate { get; } | |
} |
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
public string FirstName { get; set; } = "John"; | |
public string LastName { get; set; } = "Doe"; |
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
public string FirstName { get; set; } | |
public string LastName { get; set; } |
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
private string _firstName = "John"; | |
private string _lastName = "Doe"; | |
public string FirstName { | |
get { return _firstName; } | |
set { _firstName = value; } | |
} | |
public string LastName { | |
get { return _lastName; } |
NewerOlder