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 copy(o) { | |
var copy = Object.create(Object.getPrototypeOf(o)); | |
var propNames = Object.getOwnPropertyNames(o); | |
propNames.forEach(function(name) { | |
var desc = Object.getOwnPropertyDescriptor(o, name); | |
Object.defineProperty(copy, name, desc); | |
}); | |
return copy; |
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
source ~/.profile | |
# === SSH Agent from Atlassian - https://confluence.atlassian.com/display/BITBUCKET/Set+up+SSH+for+Git | |
SSH_ENV=$HOME/.ssh/environment | |
# start the ssh-agent | |
function start_agent { | |
echo "Initializing new SSH agent..." | |
# spawn ssh-agent |
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 partial(func /*, 0..n args */) { | |
var args = Array.prototype.slice.call(arguments, 1); // save all additional arguments to args (except index 0: func) | |
return function() { | |
var allArguments = args.concat(Array.prototype.slice.call(arguments)); // then add arguments from the original function declaration | |
return func.apply(this, allArguments); | |
}; | |
} | |
// See: http://stackoverflow.com/questions/373157/how-can-i-pass-a-reference-to-a-function-with-parameters |
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
.video { | |
position: relative; | |
padding-bottom: 56.25%; | |
height: 0; | |
overflow: hidden; | |
} | |
.video iframe, | |
.video object, | |
.video embed { |
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
# Concept: only source codes that are specific to the project should be tracked | |
# Temporary/Auxiliary Files | |
.DS_Store | |
.project | |
*.sublime-project | |
*.sublime-workspace | |
.sass-cache | |
fire_app_log.txt | |
sitemap.xml |
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
for ( name in object ) { | |
if ( object.hasOwnProperty(name) ) { | |
// do something | |
} | |
} | |
/* Reference: http://www.jslint.com/lint.html#forin */ |
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
.wrapper { | |
height: 100vh; | |
width: 100vw; | |
background-color: green; | |
} |
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
{ | |
// from: https://gist.github.com/bhongy/3817b9b8fad85096039df78e339deae4 | |
/* | |
Suggested VSCode Extensions | |
- mgmcdermott.vscode-language-babel | |
- dbaeumer.vscode-eslint | |
- flowtype.flow-for-vscode | |
- esbenp.prettier-vscode |
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 flatten = xs => Array.isArray(xs) | |
? [].concat(...xs.map(flatten)) | |
: xs; |
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
#333333,#1E2320,#709080,#FFFFFF,#1E2320,#FFFFFF,#F0DFAF,#CC9393 | |
// https://slackthemes.net/#/dark_zenburn |
OlderNewer