This file contains hidden or 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
| Object.defineProperties(Circle.prototype, { | |
| radius: { | |
| get: function(){ | |
| }, | |
| set: function(r){ | |
| } | |
| }, |
This file contains hidden or 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
| // | |
| // Crockford prototype-less style | |
| // | |
| var Circle = function(r){ | |
| return { | |
| getRadius: function(){ | |
| return r; | |
| }, | |
| setRadius: function(newR){ | |
| r = newR; |
This file contains hidden or 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 Circle = function(r) { | |
| this.setRadius(r); | |
| }; | |
| Circle.prototype = { | |
| getRadius: function(){ | |
| return this.radius; | |
| }, | |
| setRadius: function(r){ |
This file contains hidden or 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 ll='ls -la' | |
| alias git-up='git fetch; git rebase origin master' | |
| alias gs='git status -sb' | |
| # Git | |
| alias ungit="find . -name '.git' -exec rm -rf {} \;" | |
| alias gb='git branch' | |
| alias gba='git branch -a' | |
| alias gmm='git merge master' |
This file contains hidden or 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
| git reset --hard HEAD^ |
This file contains hidden or 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
| _(document.location.search.substr(1).split("&")).map(function(pair){ return { param: pair.split("=")[0], value: pair.split("=")[1] }; }); |
This file contains hidden or 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
| $("<html><body><div class='page'></div></body></html>").find('.page') | |
| [] | |
| $("<wrap><wrap><html><body><div class='page'></div></body></html></wrap></wrap>").find('.page') | |
| [ | |
| <div class="page"></div> | |
| ] |
This file contains hidden or 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
| $("<html><body></body></html>").find('body') |
This file contains hidden or 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
| ʕ•̫͡•ʕ*̫͡*ʕ•͓͡•ʔ-̫͡-ʕ•̫͡•ʔ*̫͡*ʔ-̫͡-ʔ |
This file contains hidden or 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 notSet = _(stack).reduce(function(mem, N){ return mem.add($(N)); },$("#nonexistent")); |