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
echo "alias www='cd ~/Desktop/www;clear;pwd;ls -a'" >> ~/.bash_profile |
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://stackoverflow.com/questions/9557646/php-mkdir-permissions-denied-mac | |
$processUser = posix_getpwuid(posix_geteuid()); | |
echo($processUser['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
var code = null; | |
jQuery(window).keypress(function(e){ | |
code = e.which; | |
}); | |
jQuery('#myform').submit(function(e){ | |
if( code == 13 ){//if Enter is pressed... | |
code = null;//Reset keycode to allow submission via click. | |
e.preventDefault(); |
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
<div class="btn-group pull-right" role="group"> | |
<button class="btn btn-default inline" data-target="#content .panel:not('.in')" data-toggle="collapse" id="info-page-uncollapse-all">Expand All <span class="glyphicon glyphicon-chevron-down"></span></button> | |
<button class="btn btn-default" data-target="#content .panel.in" data-toggle="collapse" id="info-page-collapse-all">Collapse All <span class="glyphicon glyphicon-chevron-up"></span></button> | |
</div> |
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://stackoverflow.com/a/901144 | |
function getParameterByName(name) { | |
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); | |
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), | |
results = regex.exec(location.search); | |
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); | |
} | |
// Usage: |
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
<div class="focus"> | |
<?php | |
echo views_embed_view('focus_area', $display_id = 'block'); | |
# from https://www.drupal.org/node/48816#comment-4582424 | |
?> | |
</div> |
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
# https://www.drupal.org/node/1032068#comment-5633442 | |
<?php | |
# print render(module_invoke('MODULE_NAME', 'block_view', 'BLOCK_DELTA')); | |
?> | |
<?php | |
print render(module_invoke('search', 'block_view', '1')); | |
# import the search block anywhere | |
?> |