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 | |
/** | |
* Wrapper for theme() that takes the override theme name to render this hook in. | |
*/ | |
function _x_theme($hook, $vars, $override_theme) { | |
_x_start_theme_override($override_theme); | |
$return = theme($hook, $vars); | |
_x_end_theme_override(); |
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
.ezhealth-ckeditor-widget, | |
.ezhealth-ckeditor-widget * { | |
box-sizing: border-box; | |
} | |
.ezhealth-ckeditor-widget { | |
border: solid 1px #ddd; | |
} | |
.ezhealth-ckeditor-widget:after { | |
content: ""; | |
display: block; |
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 | |
// Helpers | |
$space = function($hex) { | |
return implode(' ', str_split($hex, 2)); | |
}; | |
$debug = function($dec) use ($space) { | |
echo 'dec: ' . $dec . "\n"; | |
echo 'hex: ' . $space(dec2hex($dec)) . "\n\n"; | |
}; |
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
GET /api/user HTTP/1.1 | |
User-Agent: Super ultra fast super HTTP browser | |
Host: xxxxxx.xx | |
Accept: */* | |
HTTP/1.1 200 OK | |
Date: Sat, 25 Apr 2015 17:52:51 GMT | |
Content-Length: 62 |
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 | |
/** | |
* Smartqueue providers ('owners') can do this: | |
*/ | |
/** | |
* Implements hook_nodequeue_sqids(). | |
*/ | |
function USER_SMARTQUEUE_nodequeue_sqids($queue) { |
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
<?xml version="1.0"?> | |
<Tests> | |
<Test TestId="0001" TestType="CMD"> | |
<Name>Convert number to string</Name> | |
<CommandLine>Examp1.EXE</CommandLine> | |
<Input>1</Input> | |
<Output>One</Output> | |
</Test> | |
<Test TestId="0002" TestType="CMD"> | |
<Name>Find succeeding characters</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
<?php | |
// List of Item objects | |
$items = [new Item]; | |
// List of strings | |
$strings = ["Oele"]; |
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
javascript: | |
alert((function(list) { | |
console.log(list); | |
var arr = []; | |
for (var host in list) arr.push(host + ': ' + list[host]); | |
arr.sort(function(a, b) { return parseInt(b.split(': ')[1]) - parseInt(a.split(': ')[1]); }); | |
return arr; | |
})(performance.getEntriesByType('resource').reduce(function(list, res) { | |
var host = res.name.match(/\/\/([^/]+)/)[1]; | |
list[host] ? (list[host]++) : (list[host] = 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
#!/bin/sh | |
# | |
# Read old version from file, make new version, save to file | |
# file VERSION should be in the root of the project, beside README | |
# VERSION should *always* be formatted according to GNU version scheme: major.minor.revision | |
version=$(< VERSION) | |
major=`echo $version | awk -F"." '{print $1}'` | |
minor=`echo $version | awk -F"." '{print $2}'` |
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 | |
// SELECT a.*, c.d, (c.e = 'foo') AS ee, c.f AS ff | |
// FROM table1 a, table3 m | |
// LEFT JOIN table2 b ON a.x = c.x AND a.x <> '4' | |
// WHERE m.x = a.x AND a.y < 100 AND (a.z BETWEEN 1 AND 9 OR a.z = -1) | |
// GROUP BY (c.e = 'foo'), c.f | |
// HAVING MAX(m.n) > 2 | |
// ORDER BY c.e DESC | |
// LIMIT 100 |