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 fib(n,undefined){ | |
if(fib.cache[n] === undefined) | |
fib.cache[n] = fib(n-1) + fib(n-2); | |
return fib.cache[n]; | |
} | |
fib.cache = [0,1,1]; | |
fib(10); | |
console.log(fib.cache); |
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 (ev) { | |
e = ev || window.event; | |
var target = e.target || e.srcElement; | |
// have fun here | |
// cancel bubbling? | |
e.cancelBubble = true; | |
if(e.stopPropagation) { | |
e.stopPropagation(); |
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 (var attrname in obj2) { obj1[attrname] = obj2[attrname]; } | |
// smashless version | |
/** | |
* Overwrites obj1's values with obj2's and adds obj2's if non existent in obj1 | |
* @param obj1 | |
* @param obj2 | |
* @returns obj3 a new object based on obj1 and obj2 | |
*/ | |
function merge_options(obj1,obj2){ |
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
npm install --save-dev gulp gulp-cli gulp-concat gulp-jshint gulp-less gulp-load-plugins gulp-minify-css gulp-rename gulp-uglify |
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 _debug = true; | |
var XXXXXX = React.createClass({ | |
displayName: 'XXXXXX', | |
// Mixins | |
mixins: [], | |
// Props | |
propTypes: { |
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
<link rel="stylesheet" href="//code.cdn.mozilla.net/fonts/fira.css"> |
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 compose = function () { | |
var fns = arguments; | |
return function (result) { | |
for (var i = fns.length - 1; i > -1; i--) { | |
result = fns[i].call(this, result); | |
} | |
return result; | |
}; |
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
# deletes the local remote-tracking branch, but not the actual remote branch | |
git branch -rd origin/[branch name] | |
# To delete the actual remote branch | |
git push origin --delete [branch name] | |
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
{ | |
"always-semicolon": true, | |
"block-indent": 2, | |
"color-case": "lower", | |
"color-shorthand": false, | |
"quotes": "single", | |
"space-after-colon": 1, | |
"space-before-opening-brace": 1, | |
"space-after-opening-brace": "\n", | |
"space-before-selector-delimiter": 0, |
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
// Place your key bindings in this file to overwrite the defaults | |
[ | |
{ "key": "ctrl+shift+\\", "command": "workbench.action.splitEditor" }, | |
{ "key": "ctrl+\\", "command": "workbench.action.toggleSidebarVisibility" }, | |
{ "key": "ctrl+shift+c", "command": "csscomb.execute" }, | |
{ "key": "ctrl+n", "command": "workbench.action.files.newFile" }, | |
{ "key": "ctrl+shift+n", "command": "workbench.action.files.newFolder" } | |
] |
OlderNewer