Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/perl
use strict;
use warnings;
use Cwd;
use Data::Dumper; # yes really
use File::Basename;
use Daemon::Control;
use IO::Prompt::Tiny qw/prompt/;
$ re.pl
$ use warnings; use 5.010;
$ (0 > undef) . "\n"
Use of uninitialized value in numeric gt (>) at (eval 309) line 5, <FIN> line 2.
$ (0 >= undef) . "\n"
Use of uninitialized value in numeric ge (>=) at (eval 310) line 5, <FIN> line 3.
1
$ (0 == undef) . "\n"
Use of uninitialized value in numeric eq (==) at (eval 311) line 5, <FIN> line 4.
sub notes {
my ($pattern, @scale) = @_;
return map { $note < @scale ? $scale[$note] : undef } split //, $pattern;
}
#...
for my $note (notes($pattern, @scale)) {
if (defined $note) {
SELECT *
FROM products
WHERE productId IN (
SELECT relatedId
FROM product_suggestions
WHERE productId=?
)
AND live=1
AND archive=0
AND (
DELETE
sip
FROM
search_index_products sip
JOIN products p ON sip.productId=p.productId AND (sip.countryId=p.countryId OR (p.countryId=? AND p.productId NOT IN (SELECT productId FROM
products WHERE countryId=?)))
WHERE
p.refreshCache=1
AND sip.countryId=?
@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 {
$breakpoint: 992px;
@mixin small-screen {
@media (max-width: $breakpoint - 1) {
@content;
}
}
@mixin big-screen {
server {
listen 80;
server_name altre.us *.altre.us;
if ($uri = "/wildbill") {
return 301 http://shadow.cat/blog/matt-s-trout/the-wild-bill-protocol/;
}
if ($uri = "/blog") {
return 301 http://altreus.blogspot.com/;
}
$breakpoint: 992px;
@mixin small-screen {
@media (max-width: $breakpoint - 1) {
@content;
}
}
@mixin big-screen {
@media (min-width: $breakpoint) {
FROM perl
MAINTAINER Altreus <[email protected]>
RUN cpanm MooseX::Role::WithOverloading