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
@include border-radius\(([0-9]+px)+\); |
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
/** | |
* Output Buffered Load Template Part | |
* loads a given template part using output buffering | |
* optionally including $data to be passed into template | |
*/ | |
function ob_load_template_part( $template_name, $data ) { | |
// Optionally provided an assoc array of data to pass to tempalte | |
// and it will be extracted into variables |
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
javascript:(function()%7Bdocument.querySelector('body').setAttribute('contenteditable'%2C true)%7D)() |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 f in *.svg; do mv $f `basename $f .svg`.colors-white.svg; done; |
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
git branch | grep "* master" && echo 'COMMIT REJECTED - you are not allowed to commit directly to the master branch you fool!' |
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
git log --name-only --pretty=oneline --full-index SHA1..SHA2 | grep -vE '^[0-9a-f]{40} ' | sort | uniq |
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 lastScrollY = 0; | |
var ticking = false; | |
var windowMiddle = $(window).height()/2; | |
var scrollCallback = function scrollCallback(e) { | |
var elementClosestToMiddle = _this.findElementClosestToMiddle(elements, { | |
windowMiddle: windowMiddle | |
}); |
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
class Appliance { | |
turnOn() { | |
console.log(this.type + " now online"); | |
} | |
} | |
class Oven extends Appliance { | |
constructor() { | |
this.type = "Oven"; | |
} |
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 pipe = (...funcs) => seed => { | |
return funcs.reduce( (acc, func) => { | |
return func(acc); | |
}, seed); | |
} | |
const reverseWord = (val) => { | |
return val.split("").reverse().join(''); | |
}; |
OlderNewer