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
#!/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/; |
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
$ 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. |
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
sub notes { | |
my ($pattern, @scale) = @_; | |
return map { $note < @scale ? $scale[$note] : undef } split //, $pattern; | |
} | |
#... | |
for my $note (notes($pattern, @scale)) { | |
if (defined $note) { |
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
SELECT * | |
FROM products | |
WHERE productId IN ( | |
SELECT relatedId | |
FROM product_suggestions | |
WHERE productId=? | |
) | |
AND live=1 | |
AND archive=0 | |
AND ( |
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
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=? |
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
#!/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 { |
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
$breakpoint: 992px; | |
@mixin small-screen { | |
@media (max-width: $breakpoint - 1) { | |
@content; | |
} | |
} | |
@mixin big-screen { |
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
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/; | |
} |
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
$breakpoint: 992px; | |
@mixin small-screen { | |
@media (max-width: $breakpoint - 1) { | |
@content; | |
} | |
} | |
@mixin big-screen { | |
@media (min-width: $breakpoint) { |
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
FROM perl | |
MAINTAINER Altreus <[email protected]> | |
RUN cpanm MooseX::Role::WithOverloading |