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
<?php | |
function test($a) { | |
foreach ((array) $a as $k) { | |
echo $k . PHP_EOL; | |
} | |
// Ruh roh. | |
echo $a[0]; | |
} |
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
<s:simpleType name="HourType"> | |
<s:restriction base="s:string"> | |
<s:enumeration value="Unknown"/> | |
<s:enumeration value="TwelveAM"/> | |
<s:enumeration value="TwelveThirtyAM"/> | |
<s:enumeration value="OneAM"/> | |
<s:enumeration value="OneThirtyAM"/> | |
<s:enumeration value="TwoAM"/> | |
<s:enumeration value="TwoThirtyAM"/> | |
<s:enumeration value="ThreeAM"/> |
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
<?php | |
/** | |
* Implements hook_apachesolr_document_handlers(). | |
*/ | |
function example_apachesolr_document_handlers($type, $namespace) { | |
if ($type == 'node' && $namespace == 'example') { | |
return array('example_add_documents'); | |
} | |
} |
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
<?php | |
// This is a bit hacky, but here's why: node_save is wrapped in a | |
// transaction which means that our keeper info won't be written | |
// to the database until after everything in node_save finishes. | |
// That would be fine except for the fact that we're asynchronously | |
// interacting with the PuSH hub. When the hub calls back to Drupal | |
// the keeper info still hasn't been written to the database. | |
// To avoid the problem this causes we're making subscription requests | |
// on node load. Lord have mercy on my soul. |
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
diff --git a/lib/pubhub.js b/lib/pubhub.js | |
index 1878e96..9d22ab8 100644 | |
--- a/lib/pubhub.js | |
+++ b/lib/pubhub.js | |
@@ -152,6 +152,11 @@ PubHub.prototype.fetch = function(options) { | |
console.log('New data found on %s.', feedString); | |
self.emit('changed', data); | |
} | |
+ | |
+ // Explicitly null out the data so it doesn't hang around after we're |
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
Host * | |
ForwardAgent yes |
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
<thing> | |
<date year="2011" month="8" date="4" day="4"/> | |
<time hour="22" minute="15" second="7" timezone="Eastern" utc-hour="-4" utc-minute="00"/> | |
<!-- ... --> | |
</thing> |
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 supportsOrientationChange = "onorientationchange" in window; | |
var orientationEvent = supportsOrientationChange ? "orientationchange" : "resize"; | |
window.addEventListener( | |
orientationEvent, function() { | |
window.location.reload() | |
}, | |
false | |
); |
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
Order allow,deny | |
Allow from all |
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
{ | |
"name": "hosted-hubot", | |
"version": "2.1.4", | |
"author": "GitHub Inc.", | |
"keywords": "github hubot campfire bot", | |
"description": "A simple helpful Robot for your Company", | |
"licenses": [{ | |
"type": "MIT", | |
"url": "http://github.com/github/hubot/raw/master/LICENSE" | |
}], |