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
    
  
  
    
  | leedo@li41-143:~/src/filter$ make | |
| rm -f .ham.db .spam.db || echo "lol" | |
| gcc -pg -Wall filter.c -o filter | |
| In file included from filter.c:13: | |
| lookup3.c: In function ‘hashlittle’: | |
| lookup3.c:293: warning: unused variable ‘k8’ | |
| lookup3.c: In function ‘hashlittle2’: | |
| lookup3.c:478: warning: unused variable ‘k8’ | |
| lookup3.c: In function ‘hashbig’: | |
| lookup3.c:655: warning: unused variable ‘k8’ | 
  
    
      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::Proxy; | |
| use parent 'Plack::Component'; | |
| use Plack::Util::Accessor qw/host/; | |
| use AnyEvent::HTTP; | |
| use LWP::UserAgent; | |
| use lib; | |
| sub call { | |
| my ($self, $env) = @_; | 
  
    
      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 _req_headers { | |
| my ($self, $env) = @_; | |
| my @headers; | |
| if ($self->preserve_host_header and $env->{HTTP_HOST}) { | |
| push @headers, "Host", $env->{HTTP_HOST}; | |
| } | |
| elsif ($self->rewrite_host_header) { | |
| push @headers, "Host", $self->rewrite_host_header; | |
| } | |
| return @headers; | 
  
    
      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
    
  
  
    
  | test_psgi | |
| app => Plack::App::Proxy->new(host => sub { | |
| my $env = shift; | |
| ($env->{PATH_INFO} =~ /^\/(.+)/); | |
| }), | |
| client => sub { | |
| my $cb = shift; | |
| my $req = HTTP::Request->new(GET => "http://localhost/http://www.google.com"); | |
| my $res = $cb->($req); | |
| like $res->content, qr/Google Search/, "google"; | 
  
    
      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
    
  
  
    
  | proc animate args { | |
| set urls {}; | |
| set delay 0.5; | |
| for {set x 0} {$x<[llength $args]} {incr x} { | |
| set item [lindex $args $x]; | |
| if {$item == "-delay"} { | |
| set delay [lindex $args [expr $x + 1]]; | |
| } elseif {[regexp -nocase {^http} $item]} { | |
| lappend urls $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
    
  
  
    
  | args.each { |arg| | |
| img | |
| if arg.match(/^[a-f0-9]+$/) | |
| img = IMService.get_ilist_from_hash(arg).first | |
| elsif arg.match(/^http:\/\/.*\.(jpe?g|gif|png)$/i) | |
| img = self.magick_wget(arg).first | |
| end | |
| if img | |
| width = img.base_columns if img.base_columns > width | |
| height = img.base_rows if img.base_rows > height | 
  
    
      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
    
  
  
    
  | proc animate args { | |
| set urls {}; | |
| set delay 0.5; | |
| for {set x 0} {$x<[llength $args]} {incr x} { | |
| set item [lindex $args $x]; | |
| if {$item == "-delay"} { | |
| set delay [lindex $args [expr $x + 1]]; | |
| } elseif {[regexp -nocase {^http} $item]} { | |
| lappend urls $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
    
  
  
    
  | hactar% cpanm -S App::Alice | |
| Fetching http://search.cpan.org/CPAN/authors/id/L/LE/LEEDO/App-Alice-0.10.tar.gz | |
| ==> Found dependencies: IRC::Formatting::HTML, AnyEvent::HTTPD, AnyEvent::HTTP, AnyEvent::DBI, Any::Moose | |
| Fetching http://search.cpan.org/CPAN/authors/id/L/LE/LEEDO/IRC-Formatting-HTML-0.12.tar.gz | |
| ==> Found dependencies: Any::Moose | |
| Fetching http://search.cpan.org/CPAN/authors/id/S/SA/SARTAK/Any-Moose-0.11.tar.gz | |
| Building and testing Any-Moose-0.11 for Any::Moose... | |
| Any::Moose installed successfully. | |
| Building and testing IRC-Formatting-HTML-0.12 for IRC::Formatting::HTML... | |
| IRC::Formatting::HTML installed successfully. | 
  
    
      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
    
  
  
    
  | leedo@usealice:~/src/usealice$ sudo cpanm Plack::App::Proxy | |
| Fetching http://search.cpan.org/CPAN/authors/id/H/HI/HIRATARA/Plack-App-Proxy-0.13.tar.gz ... OK | |
| Configuring Plack-App-Proxy-0.03 ... OK | |
| Building and testing Plack-App-Proxy-0.03 for Plack::App::Proxy ... OK | |
| Successfully installed Plack-App-Proxy-0.03 (upgraded from 0.12) | 
  
    
      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::Middleware::Sprockets; | |
| use strict; | |
| use 5.008_001; | |
| our $VERSION = '0.01'; | |
| use JavaScript::Sprockets; | |
| use Plack::Util::Accessor qw(sprockets load_paths root); | |
| use Plack::Util; | |
| use base 'Plack::Middleware'; |