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 strict; | |
use warnings; | |
use Net::IMAP::Simple; | |
use constant { | |
LOGIN => '[email protected]', | |
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 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
# 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 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 ScriptLock; | |
use strict; | |
use FindBin; | |
use Fcntl ':flock'; | |
my $fh; | |
sub import { | |
return if $fh; |
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
[General] | |
cookies="@Variant(\0\0\0\x7f\0\0\0\x16QList<QNetworkCookie>\0\0\0\0\x1\0\0\0R\0\0\0Pproselytize=1; expires=Thu, 20-Jul-2017 23:55:55 GMT; domain=.rambler.ru; path=/\0\0\0sdv=gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA:1446749791; expires=Thu, 31-Dec-2037 23:55:55 GMT; domain=www.rambler.ru; path=/\0\0\0qdvr=gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA:1446749791; expires=Thu, 31-Dec-2037 23:55:55 GMT; domain=.rambler.ru; path=/\0\0\0Slv=1446749791; expires=Thu, 31-Dec-2037 23:55:55 GMT; domain=www.rambler.ru; path=/\0\0\0Qlvr=1446749791; expires=Thu, 31-Dec-2037 23:55:55 GMT; domain=.rambler.ru; path=/\0\0\0`ruid=AQAAAF+mO1bL2cucAaRzAQB=; expires=Thu, 31-Dec-2037 23:55:55 GMT; domain=.rambler.ru; path=/\0\0\0^_ym_uid=1446749756746775785; expires=Tue, 03-May-2016 18:55:56 GMT; domain=.rambler.ru; path=/\0\0\0_yandexuid=1324906701446749792; expires=Sun, 02-Nov-2025 18:56:32 GMT; domain=.yandex.ru; path=/\0\0\0\x38yabs-sid=874183021446749792; domain=mc.yandex.ru; path=/\0\0\0\x82__cfduid=d34a4990c9b7e37763b27835bb89eca34144674 |
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 strict; | |
use IO::Socket; | |
my $serv = IO::Socket::INET->new(Listen => 10, LocalPort => 8080) | |
or die $@; | |
my $header = join( | |
"\r\n", | |
"HTTP/1.1 200 OK", | |
"Server: nginx/1.0.4", |
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
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 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/lib/Mojo/Server/Prefork.pm b/lib/Mojo/Server/Prefork.pm | |
index 1052111..96c33f5 100644 | |
--- a/lib/Mojo/Server/Prefork.pm | |
+++ b/lib/Mojo/Server/Prefork.pm | |
@@ -78,8 +78,12 @@ sub run { | |
local $SIG{INT} = local $SIG{TERM} = sub { $self->_term }; | |
local $SIG{CHLD} = sub { | |
while ((my $pid = waitpid -1, WNOHANG) > 0) { | |
- $self->app->log->debug("Worker $pid stopped.") | |
- if delete $self->emit(reap => $pid)->{pool}{$pid}; |
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
CamlQuery camlQuery = new CamlQuery(); | |
camlQuery.FolderServerRelativeUrl = cFolder.ServerRelativeUrl; | |
List list = ctx.Web.Lists.GetById(listGuid); | |
ctx.Load(list); | |
ctx.ExecuteQuery(); | |
var items = list.GetItems(camlQuery); | |
ctx.Load(items); | |
ctx.ExecuteQuery(); | |
foreach (ListItem i in items) |
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 strict; | |
use IO::Socket::IP; | |
use Socket 'IPPROTO_TCP'; | |
use IO::Select; | |
my ($err, @res) = Socket::getaddrinfo("www.google.com", 80, {protocol => IPPROTO_TCP}); | |
die $err if $err; | |
my $ip = IO::Socket::IP->new(Blocking => 0, PeerAddrInfo => \@res) or die $@; | |
my $sel = IO::Select->new($ip); |
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 strict; | |
use blib; | |
use Net::DNS_A; | |
for (1..10_000) { | |
Net::DNS_A::lookup("localhost"); | |
} | |
sleep; |
NewerOlder