This file contains 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
$i++%50||++$j&mkdir($f="folder$j")&($i=1),rename$_,"$f/$i"for<*> |
This file contains 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 strict; | |
use warnings; | |
use Net::IMAP::Simple; | |
use constant { | |
LOGIN => 'xxx@gmail.com', | |
PASSWORD => '123', | |
MAILBOX => 'Label', # folder to delete from, some label may be used here | |
TRASH => '[Gmail]/&BBoEPgRABDcEOAQ9BDA-', # trash folder name for ru users, should be '[Gmail]/Trash' for en | |
}; |
This file contains 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
# image at the center of the video | |
# https://stackoverflow.com/questions/10918907/how-to-add-transparent-watermark-in-center-of-a-video-with-ffmpeg | |
ffmpeg -i small.mp4 -i avatar.png -filter_complex "overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2" -codec:a copy output.mp4 | |
# with transparency | |
# https://stackoverflow.com/questions/38753739/ffmpeg-overlay-a-png-image-on-a-video-with-custom-transparency | |
ffmpeg -i small.mp4 -i avatar.png -filter_complex "[1:v]format=argb,colorchannelmixer=aa=0.5[zork];[0:v][zork]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2" -codec:a copy output.mp4 | |
# text | |
# https://stackoverflow.com/questions/17623676/text-on-video-ffmpeg |
This file contains 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
BEGIN { $ENV{MOJO_MAX_MESSAGE_SIZE} = 1024**3 } | |
use strict; | |
use Mojo::UserAgent; | |
$| = 1; | |
my $ua = Mojo::UserAgent->new; | |
$ua->on(start => sub { | |
my ($ua, $tx) = @_; | |
This file contains 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 Mojolicious::Lite; | |
use POSIX; | |
get '/' => sub { | |
my $child = fork(); | |
unless (defined $child) { | |
die "fork(): $!"; | |
} | |
elsif ($child == 0) { |
This file contains 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 ScriptLock; | |
use strict; | |
use FindBin; | |
use Fcntl ':flock'; | |
my $fh; | |
sub import { | |
return if $fh; |
This file contains 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 strict; | |
package JUNOS::Config::Parser; | |
sub new { | |
my ($class, %cb) = @_; | |
bless \%cb, $class; | |
} | |
sub parse { |
This file contains 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 strict; | |
use Coro::PatchSet 0.04; | |
BEGIN { | |
package IO::Select; | |
use Coro::Select; | |
use IO::Select; | |
} | |
use IO::Socket::Socks qw(:constants :DEFAULT); | |
use Coro; | |
use Coro::Socket; |
This file contains 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 strict; | |
use Mojo::Reactor::EV; | |
use v5.10; | |
BEGIN { | |
$ENV{MOJO_REACTOR} = 'Mojo::Reactor::EV'; | |
$ENV{MOJO_IOLOOP_DEBUG} = 1; | |
} | |
use Mojo::IOLoop; | |
use Mojo::UserAgent; | |
use AnyEvent::HTTP; |
This file contains 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 strict; | |
use v5.10; | |
BEGIN { | |
$ENV{MOJO_REACTOR} = 'Mojo::Reactor::Poll'; | |
$ENV{MOJO_IOLOOP_DEBUG} = 1; | |
} | |
use Mojo::IOLoop; | |
use Mojo::UserAgent; | |
use Net::Async::HTTP; | |
use URI; |
NewerOlder