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 _serverName { | |
| my $self = shift; | |
| my $row = shift; | |
| return (length($row->{'inventory_tag'}) | |
| ? $row->{'inventory_tag'} | |
| : (length($row->{'hostname'}) | |
| ? $row->{'hostname'} | |
| : (length($row->{'rack_id'}) | |
| ? $row->{'rack_id'} | |
| : (length($row->{'nickname'}) |
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 Regexp::Grammars; | |
| use File::Slurp; | |
| use Data::Dump qw/dump/; | |
| my $config = read_file $ARGV[0]; | |
| my $parser = qr{ | |
| <[Item]>+ |
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
| onCmdC: function(event) { | |
| if (!this.activeWindow.input.focused) { | |
| this.activeWindow.input.cancelNextFocus(); | |
| } | |
| }, | |
| onCmdK: function() { | |
| this.activeWindow.messages.update(""); | |
| this.activeWindow.lastNick = ""; | |
| }, |
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 seed | |
| Gtk = imports.gi.Gtk; | |
| Glib = imports.gi.GLib; | |
| WebKit = imports.gi.WebKit; | |
| os = imports.os; | |
| Gtk.init(Seed.argv); | |
| window = new Gtk.Window({title: "Alice"}); |
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
| $$('head script[src]').findAll(function(s) { | |
| return s.src.match(js); | |
| }).each(function(s) { | |
| var params = s.src.match(js)[1]; | |
| params.split("&").each(function(o) { | |
| var kv = o.split("="); | |
| options[kv[0]] = kv[1]; | |
| }); | |
| }); |
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 IO::Socket::INET; | |
| use AnyEvent::Socket; | |
| use AnyEvent::Handle; | |
| use FindBin; | |
| use lib "$FindBin::Bin/../lib"; | |
| use App::Alice; | |
| my $confdir = "/home/leedo/alices"; |
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 Text::MicroTemplate::File; | |
| use AnyEvent::DBI; | |
| my $dbh = AnyEvent::DBI->new("DBI:SQLite:dbname=users.db","",""); | |
| my $tmt = Text::MicroTemplate::File->new( | |
| include_path => "/home/leedo/alice-manager/templates" | |
| ); | |
| package HTTPProxyHandler; | |
| use base qw(Tatsumaki::Handler); |
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
| http_request(GET => $url, | |
| want_body_handle => 1, | |
| sub { | |
| my ($handle, $headers) = @_; | |
| $self->response->headers($headers); | |
| $handle->on_eof(sub { | |
| $self->finish; | |
| $handle->destroy | |
| }); | |
| $handle->on_read(sub { |
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 Joe::Registration::Form; | |
| use HTML::FormHandler::Moose; | |
| extends 'HTML::FormHandler'; | |
| has '+item_class' => ( default => 'Registration' ); | |
| has_field username => ( | |
| type => 'Username', | |
| label => 'Username', |
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 Plack::App::ImageProxy; | |
| use strict; | |
| use warnings; | |
| use Path::Class qw/dir/; | |
| use Cache::File; | |
| use Plack::Request; | |
| use Plack::Response; | |
| use AnyEvent::HTTP; |
OlderNewer