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 a() { | |
echo "Called A.\n"; | |
return false; | |
} | |
function b() { | |
echo "Called B.\n"; | |
return true; |
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
<style> | |
body { font: 13px arial; } | |
p { position: relative; } | |
p.fixed { background: white; } | |
object { | |
float: left; | |
border: 1px solid red; | |
margin: 0 10px 10px 0; | |
width: 200px; | |
height: 50px; |
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
// Here is how to get less parsing of <style> tags for quick development | |
// I made this with less.js 1.0.17, not sure how far back it works | |
// change this to wherever your less.js is stored | |
<script src="http://dkb.local/js/lessjs/less.js"></script> | |
// then do this somewhere | |
<script> | |
var styleEls = document.getElementsByTagName('style'); | |
for (var i in styleEls) |
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
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript" charset="utf-8"></script> | |
<script> | |
$.extend($.expr[':'], { | |
childless: function(a) { | |
return !$(a).children().not('a').size(); | |
} | |
}); | |
$(function() { | |
console.log($('.value:childless').get()); |
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
// checks every few secs to see if any source file is updated and reloads if needed | |
// reloadr.php should check mtimes of files you want to track and return max(mtimes). | |
// like this: | |
/* | |
<?php | |
$files = array_merge( | |
glob('*.php'), | |
glob('tests/*.php') | |
); |
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
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js" type="text/javascript" charset="utf-8"></script> | |
<script type="text/javascript" charset="utf-8"> | |
// jquery error checking plugin | |
(function($) { | |
errors = { | |
test: function() { | |
var args = $.makeArray(arguments); | |
var msg, test = args.shift(); | |
if ( msg = errors.tests[test].apply(this, args) ) throw msg; | |
}, |
NewerOlder