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
// http://www.2ality.com/2013/09/javascript-unicode.html | |
function toUTF16(codePoint) { | |
var TEN_BITS = parseInt('1111111111', 2); | |
function u(codeUnit) { | |
return '\\u'+codeUnit.toString(16).toUpperCase(); | |
} | |
if (codePoint <= 0xFFFF) { | |
return u(codePoint); | |
} |
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
terminus wp "search-replace 'find' 'replace' --dry-run" --site=mysite --env=dev|test|live |
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
// Trim text. | |
/* | |
- Respects word boundaries by default (will not chop a word up to create ellipses by default). | |
- Allows for ellipses or no ellipses. | |
*/ | |
function trimText( jquery_obj_to_trim, int_trim_length, bool_ellipses, bool_respect_word_boundaries ){ | |
var ellipses; | |
if( typeof bool_ellipses === "undefined" ){ |
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
alert(([][[]]+[])[!+[]+!![]+!![]+!![]]+([] | |
[[]]+[])[+[]]+(!![]+[])[+[]]+([][[]]+[]) | |
[+[]]+([]+{})[!+[]+!![]]+([][[]]+[])[! | |
+[]+!![]+!![]+!![]+!![]]+(![]+[])[!+[]+!! | |
[]]+([][[]]+[])[!+[]+!![]+!![]]+([][[]]+[]) | |
[!+[]+!![]+!![]]+(!![]+[])[+[]]) |
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
Show hidden characters
[ | |
{ "keys": ["ctrl+tab"], "command": "next_view" }, | |
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" } | |
] |
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
$.fn.equalheight = function( remove ) { | |
// Reset heights from the last viewport resize so that values do not get wacky-large. | |
this.height('auto'); | |
// if remove is true, just reset the heights and return | |
if ( remove ) { | |
return; | |
} |