Skip to content

Instantly share code, notes, and snippets.

return (isNaN(ai) || isNaN(bi)) ?
(a > b) ? 1
: (a < b) ? -1
: 0 // not floats
: (ai > bi) ? 1
: (ai < bi) ? -1
: 0;
@Altreus
Altreus / test.pl
Last active August 29, 2015 14:03 — forked from vaskozl/test.pl
#!/usr/bin/perl
use warnings;
use strict;
package MyBot;
use base qw( Bot::BasicBot );
# the 'said' callback gets called when someone says something in
# earshot of the bot.
sub said {
<script type="text/javascript">
[% footer_js %]
PF.Admin.M.activate();
PF.Admin.M.init(cfg);
</script>