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 | |
class foo { | |
const bar = 'foobar'; | |
} | |
$name = 'bar'; | |
if (defined('foo::' . $name)) { | |
echo constant('foo::' . $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
;;;;;;;;;;;;;;;;;;; | |
;; About this file ; | |
;;;;;;;;;;;;;;;;;;;; | |
;; | |
;; built by G. Giunta as a verbatim copy of info from xedbug website on 2007/11/08 | |
; | |
;; You must uncomment one (and only one) line from the following to load | |
;; the xdebug extension. | |
;zend_extension="/usr/lib/php4/xdebug.so" | |
;;zend_extension_ts="/usr/lib/php4/xdebug.so" |
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": "QualityRuleset", | |
"rules": [ | |
{ | |
"name": "DoesntExceedMaxLineLength", | |
"vars": { | |
"soft": 80, | |
"hard": 100, | |
} | |
}, |
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 | |
// Create array | |
$items = range(0,100000); | |
$times = array(); | |
$realArray = array(); // id and name | |
$metaArray = array(); // token and bob | |
foreach ($items as &$item) { |
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 | |
Media::type('xml', 'application/xml', array( | |
'layout' => false, | |
'encode' => function($data) { | |
$xml = new SimpleXMLElement('<root/>'); | |
array_walk_recursive($data, array($xml, 'addChild')); | |
return $xml->asXML(); | |
}, | |
)); |
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
CURLOPT_AUTOREFERER..............58 | |
CURLOPT_BINARYTRANSFER...........19914 | |
CURLOPT_RETURNTRANSFER...........19913 | |
CURLOPT_COOKIESESSION............96 | |
CURLOPT_CERTINFO.................172 | |
CURLOPT_VERBOSE..................41 | |
CURLOPT_CRLF.....................27 | |
CURLOPT_DNS_USE_GLOBAL_CACHE.....91 | |
CURLOPT_FAILONERROR..............45 |
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 | |
namespace foo\bar\baz; | |
use ReflectionClass; | |
use ReflectionMethod; | |
use Exception; | |
class foo { |
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 | |
namespace foo\bar\baz; | |
use ReflectionClass; | |
use ReflectionMethod; | |
use Exception; | |
use BadMethodCallException; | |
error_reporting(-1); |
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
<!DOCTYPE HTML> | |
<html> | |
<body> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script> | |
<script type="text/javascript"> | |
document.parentWrite = document.write; | |
document.writeCounter = 0; | |
document.write = function(data) { | |
var id = 'writeCount' + String(this.writeCounter++); | |
this.parentWrite('<span id="' + id + '"></span>'); |
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
jQuery('.post_control.reblog_button').each(function(i, el) { | |
setTimeout(function() { | |
// Buttons | |
reblogLink = jQuery(el); | |
unstarLink = reblogLink.next('a.like_button'); | |
// Open Photo | |
jQuery(reblogLink).trigger('click'); |