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
Spicy Peanut Dressing | |
1/3 cup natural peanut butter | |
1/3 cup rice wine vinegar | |
2 tablespoons soy sauce | |
2 tablespoons (packed) brown sugar | |
1 tablespoon Sriracha | |
1 large garlic clove, pressed |
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
Reminder: Typing document.body.contentEditable = true; into DevTools makes *all* of the text on a page editable. Useful for prototyping |
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
foreach($_SERVER as $key => $value){ | |
echo "".$key.' - '.$value."<br>"; | |
} |
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
cache_clear_all('*', 'cache_field', TRUE); |
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
ini_set('memory_limit','2048M'); | |
dpm(ini_get('memory_limit')); |
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
drush php-eval '$m =memcache_connect("localhost", 11211); print_r($m->getStats());' |
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
<?php | |
$memcache = new Memcache; | |
$memcache->connect('127.0.0.1', 11211) | |
or die ("Could not connect to memcache server"); | |
$cells = ''; | |
$list = array(); | |
$allSlabs = $memcache->getExtendedStats('slabs'); | |
$items = $memcache->getExtendedStats('items'); | |
foreach($allSlabs as $server => $slabs) { | |
foreach($slabs as $slabId => $slabMeta) { |
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
// From http://www.opensourcery.com/blog/jessehs/what-was-query | |
// Devel Configuration -- Add this to | |
$conf['dev_query'] = TRUE; | |
<?php | |
global $queries; | |
$query = array_pop($queries); | |
dd($query, 'descriptive text about the query being printed out -- this one is logged to /tmp/drupal_debug.txt'); | |
dpm($query, 'descriptive text about the query being printed out -- this one is printed to the screen'); | |
?> | |
// Also: debug(strtr($query, $query->getArguments())); will show a query with arguments replaced in. It won't be quoted so it's not perfect but it integrates with the testing framework and doesn't require devel. (from CHX) |
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
<!-- load the jQuery and require.js libraries --> | |
<script type="text/javascript" src="http://cdn.aloha-editor.org/latest/lib/vendor/jquery-1.7.2.js"></script> | |
<script type="text/javascript" src="http://cdn.aloha-editor.org/latest/lib/require.js"></script> | |
<!-- load the Aloha Editor core and some plugins --> | |
<script src="http://cdn.aloha-editor.org/latest/lib/aloha.js" | |
data-aloha-plugins="common/ui, | |
common/format, | |
common/list, | |
common/link, |
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
drush vset update_check_disabled 1 -y && drush --simulate --pipe --no up | |
# see http://mark.shropshires.net/blog/list-all-projects-available-updates-using-drush |