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
# put below code in ~/.gitconfig | |
[includeIf "gitdir:~/Projects/personal/"] | |
path = ~/.gitconfig-personal | |
[includeIf "gitdir:~/Projects/project1/"] | |
path = ~/.gitconfig-project1 | |
[includeIf "gitdir:~/Projects/project2/"] | |
path = ~/.gitconfig-project1 | |
# put below code in ~/.gitconfig-project1 | |
[user] |
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
# Put below code in ~/.ssh/config | |
# Default GitHub | |
Host github.com | |
ForwardAgent yes | |
HostName github.com | |
User git | |
IdentityFile ~/.ssh/id_rsa | |
# private GitHub | |
Host github.orgname.com | |
HostName github.orgname.com |
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
export const isObjectEqual = (obj1, obj2) => { | |
if(!isObject(obj1) || !isObject(obj2)) { | |
return false; | |
} | |
if (obj1 === obj2) { | |
return true; | |
} | |
const item1Keys = Object.keys(obj1).sort(); |
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 object1 = {color: "blue", size: 12}; | |
var object2 = object1 | |
object2.color = "red" | |
object1 === object2 //true | |
object3 = Object.assign({}, object1) | |
object3.color = "red" | |
object1 === object3 //false |
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 es6BindAll(context, methodNames) { | |
methodNames.map(function(methodName) { | |
context[methodName] = context[methodName].bind(context); | |
}); | |
}; | |
// Usage: | |
// es6BindAll(this, ["method1", "method2", "methodX"]); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="ReactJS Template / Sandbox"> | |
<script src="https://fb.me/react-15.1.0.js"></script> | |
<script src="https://fb.me/react-dom-15.1.0.js"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
li {list-style:none} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="ReactJS Template / Sandbox"> | |
<script src="https://fb.me/react-15.1.0.js"></script> | |
<script src="https://fb.me/react-dom-15.1.0.js"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
li {list-style:none} |
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
.block {float: left;width: 200px;height: 200px; } | |
.pink { background: #ee3e64; } | |
.blue { background: #44accf; } | |
.green { background: #b7d84b; } | |
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
.box { position: absolute; width: 200px; height: 200px; } | |
#box_1 { background: #ee3e64; top: 0; left: 0; } | |
#box_2 { background: #44accf; top: 0; right: 0; } | |
#box_3 { background: #b7d84b; bottom: 0; left: 0; } | |
#box_4 { background: #ebde52; bottom: 0; right: 0; } | |
.orange { background: #f95b34; position: absolute; top: 39%; left: 41%; width: 40px; height: 40px; } | |
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
.block { | |
float: left; | |
width: 200px; | |
height: 200px; | |
} | |
.pink { background: #ee3e64; } | |
.blue { background: #44accf; } | |
.green { background: #b7d84b; } | |