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/env perl | |
| use Modern::Perl; | |
| use autodie; | |
| use IO::Async::Loop; | |
| use IO::Async::Protocol::LineStream; | |
| use IO::Async::Stream; | |
| use IO::Async::Timer::Periodic; | |
| use IO::Handle; | |
| use POSIX qw(mkfifo strftime); |
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
| Config { font = "-misc-fixed-medium-r-semicondensed--12-120-75-75-c-60-iso8859-15" | |
| , bgColor = "black" | |
| , fgColor = "grey" | |
| , position = Top | |
| , lowerOnStart = False | |
| , commands = [ Run Date "%Y-%m-%d %H:%M:%S" "date" 10 | |
| , Run Battery [] 600 | |
| , Run StdinReader | |
| , Run PipeReader "/tmp/statusbar-np" "np" | |
| ] |
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
| use Modern::Perl; | |
| use IO::Async::Loop; | |
| use Net::Async::IRC; | |
| my $loop = IO::Async::Loop->new(); | |
| my $irc = Net::Async::IRC->new( | |
| on_message_text => sub { | |
| my ($self, $message, $hints) = @_; |
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
| use Modern::Perl; | |
| use MooseX::Declare; | |
| use Moose::Util::TypeConstraints; | |
| use Moose::Util qw(apply_all_roles); | |
| BEGIN { | |
| class_type 'Net::Async::IRC::Message'; | |
| } |
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
| use Modern::Perl; | |
| use Hailo; | |
| use AnyEvent; | |
| use AnyEvent::Worker; | |
| my $worker = AnyEvent::Worker->new( | |
| { | |
| class => 'Hailo', | |
| args => [brain => '/home/mxey/skyshaper/happyman/hailo.sqlite',] | |
| } |
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
| use Modern::Perl; | |
| use MooseX::Declare; | |
| use Moose::Util::TypeConstraints; | |
| use Moose::Util qw(apply_all_roles); | |
| BEGIN { | |
| class_type 'Net::Async::IRC::Message'; | |
| } |
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/env perl | |
| use strict; | |
| use warnings; | |
| use Config::Tiny; | |
| use Email::Simple; | |
| use File::Slurp; | |
| use IO::Handle; | |
| use Net::LDAP; | |
| use Sys::Syslog; |
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
| irb(main):001:0> nil == "foo" | |
| => false | |
| irb(main):002:0> "foo" == nil | |
| => false | |
| irb(main):003:0> nil == nil | |
| => true | |
| irb(main):004:0> nil == 1 | |
| => false | |
| irb(main):005:0> 1 == nil | |
| => false |
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
| var http = require('http'); | |
| var url = require('url'); | |
| var fs = require('fs'); | |
| var pattern = /4chan\.org/i; | |
| var censored_message = fs.readFileSync('censored.html'); | |
| http.createServer(function (req, res) { | |
| var u = url.parse(req.url); | |
| var c = http.createClient(u.port || 80, u.host); |
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
| package App::Intercensor::QuestSelection::Hash; | |
| use strict; | |
| use warnings; | |
| sub new { | |
| my ($class) = @_; | |
| return bless {}, $class; | |
| } |