Skip to content

Instantly share code, notes, and snippets.

View Maciek416's full-sized avatar

Maciej Adwent Maciek416

View GitHub Profile
Object.defineProperties(Circle.prototype, {
radius: {
get: function(){
},
set: function(r){
}
},
//
// Crockford prototype-less style
//
var Circle = function(r){
return {
getRadius: function(){
return r;
},
setRadius: function(newR){
r = newR;
var Circle = function(r) {
this.setRadius(r);
};
Circle.prototype = {
getRadius: function(){
return this.radius;
},
setRadius: function(r){
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'
git reset --hard HEAD^
_(document.location.search.substr(1).split("&")).map(function(pair){ return { param: pair.split("=")[0], value: pair.split("=")[1] }; });
$("<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>​
]
$("<html><body></body></html>").find('body')
ʕ•̫͡•ʕ*̫͡*ʕ•͓͡•ʔ-̫͡-ʕ•̫͡•ʔ*̫͡*ʔ-̫͡-ʔ
var notSet = _(stack).reduce(function(mem, N){ return mem.add($(N)); },$("#nonexistent"));