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 add { | |
my ($self, $window_id, $message) = @_; | |
AnyEvent::HTTP::http_request | |
POST => "$self->{url}/buckets/$window_id", | |
body => encode_json($message), | |
headers => { | |
"x-riak-index-msgid_int" => $message->{msgid}, | |
"x-riak-index-nick_bin" => lc $message->{nick}, | |
"x-riak-index-timestamp_int" => $message->{timestamp}, |
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 $INC{'My/Role.pm'}; | |
require My::Role; | |
My::Role->apply($instance); |
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 Test::More; | |
use Test::Fatal; | |
use XML::LibXML; | |
my $escape = sub { | |
my $string = shift; | |
$string =~ s/&([^;]+(?:\s|<|$))/&$1/g; | |
return $string; | |
}; |
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 | |
package Bang; | |
sub new { bless {}, __PACKAGE__ } | |
package main; | |
use AnyEvent; |
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 AnyEvent; | |
use AnyEvent::Handle; | |
use AnyEvent::Socket; | |
my $cv = AE::cv; | |
my @commands = ( | |
{ |
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 Alice; | |
use AnyEvent; | |
my @users = ( | |
{ user => "user1", | |
port => 9000, | |
path => "/home/user1/.alice" | |
}, | |
{ user => "user2", | |
port => 9001, |
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 start_murder_timer { | |
my $self = shift; | |
# check every hour for alices that have been idle too long | |
$self->{murder_t} = AE::timer 0, 60 * 60, sub { | |
my $day = 60 * 60 * 24; | |
my %murder_table = ( | |
1 => time - ($day * 3), | |
2 => time - ($day * 10), | |
3 => time - ($day * 20), | |
4 => time - ($day * 30), |
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
<html class="no-js" dir="ltr" lang="en"> @0 | |
<head> @0.0 | |
<title> @0.0.0 | |
"Screen Shot 2011-09-17 at 10.00.15.png" | |
<body id="image"> @0.1 | |
<h1> @0.1.0 | |
<a href="http://store.getcloudapp.com/"> @0.1.0.0 | |
"Simple sharing" | |
<h2> @0.1.1 | |
"Screen Shot 2011-09-17 at 10.00.15.png" |
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 Web::Scraper; | |
use Data::Dump qw/pp/; | |
use File::Slurp; | |
my $html = read_file($ARGV[0]); | |
my $scraper = scraper { | |
process 'header#content', html => 'RAW'; |
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
diff --git a/src/css/alice.scss b/src/css/alice.scss | |
index 12ee515..8d742fe 100644 | |
--- a/src/css/alice.scss | |
+++ b/src/css/alice.scss | |
@@ -454,7 +454,7 @@ ul#tabs { | |
padding-left: 1px; | |
font-size: 11px; | |
position: absolute; | |
- left: 0px; | |
+ right: 0px; |