Hi:
perl -e 'print "hello world!\n"'
A simple filter:
perl -ne 'print if /REGEX/'
Filter out blank lines (in place):
| #!/usr/bin/env perl | |
| use strict; | |
| use warnings; | |
| use HTTP::Tiny; | |
| use Getopt::Long 'GetOptions'; | |
| use Encode qw(encode decode); | |
| use Parallel::ForkManager; | |
| use PerlIO::gzip; | |
| use Selenium::Remote::Driver; | |
| use Time::HiRes 'sleep'; |
Hi:
perl -e 'print "hello world!\n"'
A simple filter:
perl -ne 'print if /REGEX/'
Filter out blank lines (in place):
| IP="127.0.0.1" | |
| PORT="8877" | |
| SHARED_SECRET="shared secret" | |
| OPENSSL="/usr/local/opt/libressl/bin/openssl" | |
| OPENSSL_CMD="$OPENSSL enc -a -A -aes-256-gcm" | |
| while IFS= read -r MSG; do | |
| echo "$MSG" | $OPENSSL_CMD -e -k "$SHARED_SECRET" | |
| echo |
| #!/usr/bin/env perl | |
| use v5.10; | |
| use strict; | |
| use warnings; | |
| use Mojolicious::Lite; | |
| # Explicit use as a helper for PAR |
| // ==UserScript== | |
| // @name Отложенная запись в localStorage | |
| // @include http://*/* | |
| // @include https://*/* | |
| // @version 1.0.0 | |
| // @grant none | |
| // ==/UserScript== | |
| (function(){ |
| function WindowController () { | |
| this.id = Math.random(); | |
| this.isMaster = false; | |
| this.others = {}; | |
| window.addEventListener( 'storage', this, false ); | |
| window.addEventListener( 'unload', this, false ); | |
| this.broadcast( 'hello' ); |
| #!/usr/bin/env perl | |
| use 5.010; | |
| use open qw(:locale); | |
| use strict; | |
| use utf8; | |
| use warnings qw(all); | |
| use Mojo::UserAgent; | |
| # FIFO queue |
| use Mojolicious::Lite; | |
| use File::Temp qw(tempfile); | |
| use Proc::Background; | |
| use Fcntl qw(SEEK_SET); | |
| use IO::Handle; | |
| any '/run' => sub { | |
| my $self = shift; |
| #!/usr/bin/env perl | |
| use Mojolicious::Lite; | |
| use Mango; | |
| use Mango::BSON 'bson_oid'; | |
| helper mango => sub { state $mango = Mango->new($ENV{PASTEDB}) }; | |
| helper pastes => sub { shift->mango->db->collection('pastes') }; | |
| get '/' => 'submit'; |