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 | |
// 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 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
.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 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 | |
/** | |
* 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 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
javascript: | |
alert("domready: " + (performance.timing.domContentLoadedEventEnd - performance.timing.navigationStart) + " ms\nonload: " + (performance.timing.loadEventEnd - performance.timing.navigationStart) + ' ms'); | |
void(0); |
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
function getTrace() { | |
try { | |
throw new Error; | |
} | |
catch (ex) { | |
var matches = []; | |
ex.stack.replace(/([^\s]+):(\d+):(\d+)/g, function(all, file, line, column) { | |
file = file.replace(/^[\s\(]/g, ''); | |
matches.push({"file": file, "line": line, "column": column}); |
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
(function() { | |
var _x, _y; | |
function scroll(video) { | |
var x = _x / innerWidth; | |
var dx = 1.1 * (-innerWidth/2*x + innerWidth/4); | |
video.style.marginLeft = Math.round(Math.max(-innerWidth/4, Math.min(innerWidth/4, dx))) + 'px'; | |
var y = _y / innerHeight; |
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
javascript: | |
(function() { | |
WebSocket.sockets || (WebSocket.sockets = []); | |
var s = WebSocket.prototype.send; | |
WebSocket.prototype.send = function(data) { | |
if (!this._oh) { | |
this._oh = 1; | |
WebSocket.sockets.push(this); | |
this.addEventListener('message', function(e) { | |
console.log('receive', e.data); |
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
Every 1.0s: php summary.php Wed Feb 18 00:12:37 2015 | |
29 687 projects downloaded. | |
10 015 of those have a 7.x release. | |
Parsed 602 modules' dependencies. | |
167 of those have NO dependencies. | |
0 projects FAILED to download INFOS. |
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
//////////////////////////////////////////////////////// | |
// Moved to https://github.com/rudiedirkx/Auto-indent // | |
//////////////////////////////////////////////////////// | |
/** | |
* To do: | |
* - tab/shift tab: (un)indent a line on command | |
* - 'mass tab': select several lines and (un)indent them all (requires TAB) | |
* - support for undo/redo, by using `execCommand('insertText')` |
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
http://www.elizium.nu/scripts/lemmings/ | |
Fun | |
1. BAJHLDHBCL | |
2. |