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
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> | |
<msub> | |
<mrow class="MJX-TeXAtom-ORD"> | |
<mi mathvariant="bold">V</mi> | |
</mrow> | |
<mn>1</mn> | |
</msub> | |
<mo>×<!-- × --></mo> | |
<msub> | |
<mrow class="MJX-TeXAtom-ORD"> |
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
\frac{1}{(\sqrt{\phi \sqrt{5}}-\phi) e^{\frac25 \pi}} = | |
1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} | |
{1+\frac{e^{-8\pi}} {1+\ldots} } } } |
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 | |
interface ApiErrorCode { | |
const WRONG_ACTION = 0; | |
const WRONG_PARAMETERS_SET = 1; | |
public function getError(); | |
} | |
interface ChartusApiErrorCode extends ApiErrorCode { | |
const WRONG_USER_CREDENTIALS = 2; | |
const CANT_RETRIEVE_AUTH_TOKEN = 3; |
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 return false; |
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 | |
// domain => apiKey dictionary | |
$allowedDomains = array( | |
'domain-from.com' => 's0m3d0ma1n1d', | |
); | |
$host = parse_url($_SERVER['HTTP_ORIGIN'], PHP_URL_HOST); | |
if(!empty($host) | |
&& isset($allowedDomains[$host]) | |
&& isset($_POST['apiKey']) | |
&& $allowedDomains[$host] == $_POST['apiKey']) { |
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 | |
if(empty($_SERVER['HTTP_ORIGIN'])) { | |
die; | |
} | |
defined('LOG_DIR') OR define('LOG_DIR', dirname(__FILE__) . '/log/'); | |
// domain => apiKey dictionary | |
$allowedDomains = array( | |
'qualify-test-site.local' => 's0m3d0ma1n1d', | |
); | |
$host = parse_url($_SERVER['HTTP_ORIGIN'], PHP_URL_HOST); |
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
array ( | |
'apiKey' => 's0m3d0ma1n1d', | |
'domain' => 'qualify-test-site.local', | |
'userActions' => | |
array ( | |
0 => | |
array ( | |
'htmlElement' => | |
array ( | |
'element_id' => 'test-form', |
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 | |
/* | |
By Marco Arment <[email protected]>. | |
This code is released in the public domain. | |
THERE IS ABSOLUTELY NO WARRANTY. | |
Usage example: | |
// In a registration or password-change form: |
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 | |
if(!empty($labelNegativeFilter)) { | |
$criteria->addCondition(' | |
t.id NOT IN ( | |
SELECT bug_id FROM {{bug_by_label}} | |
WHERE label_id IN ( | |
' . implode(',', $labelNegativeFilter) .' | |
) | |
) | |
'); |
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
#!/usr/bin/env python | |
def list_to_dict(pages): | |
return {page['name']: page for page in pages} | |
def convert_bookmarks(bookmarks): | |
for root, directory in bookmarks['roots'].iteritems(): | |
directory['children'] = list_to_dict(directory['children']) | |
if __name__ == '__main__': |