View html2vk.py
#!/usr/bin/env python3
import argparse
from bs4 import BeautifulSoup
import requests
import urllib.parse
import re
def extract_tumblr_content(soup):
item = soup.find(class_='post-content')
View keybase.md

Keybase proof

I hereby claim:

  • I am berekuk on github.
  • I am berekuk (https://keybase.io/berekuk) on keybase.
  • I have a public key whose fingerprint is A742 E40C 51FD BA2A 27E1 5E9F 3D2A 774C 5489 F96C

To claim this, I am signing this object:

View custom-status-check.pm
# two options:
# 1) put it into Ubic::Service::Starman::WithFileChangeDetection, and reuse it in multiple ubicservice configs;
# in this case, you'll have to add [package ...] line here
# 2) put it directly into service config; in this case, you don't need package line
use strict;
use warnings;
use parent qw(Ubic::Service::Starman); # or whatever you use
use Ubic::Result qw(result);
View MyService.pm
...
sub custom_commands { qw( foo bar ) };
sub do_custom_command {
my ($self, $command) = @_;
if ($command eq "foo") {
... # do action "foo"
}
elsif ($command eq "bar") {
... # do action "bar"
View test-moo.pl
#!/usr/bin/env perl
# This code is working.
package R1;
use Moo::Role;
before 'foo', 'bar' => sub {
print "before\n";
};
View wget-invalid.txt
### This is riotgames headers and html
mmcleric@mmbook:~$ wget -S -O - 'http://questhub.io'
--2013-06-04 03:39:28-- http://questhub.io/
Resolving questhub.io... 54.225.128.184
Connecting to questhub.io|54.225.128.184|:80... connected.
HTTP request sent, awaiting response...
HTTP/1.1 200 OK
Cache-Control: must-revalidate
Content-Type: text/html; charset=utf-8
View coro-test.pl
#!/usr/bin/env perl
use strict;
use warnings;
use Coro;
use Coro::AnyEvent;
my $param;
sub param {
View app.pl
#!/usr/bin/env perl
use Dancer2;
use Coro::AnyEvent;
set logger => 'console';
set log => 'core';
get '/:foo' => sub {
Coro::AnyEvent::sleep 1;
View test.txt
$ perl -e 'use Dancer::Request; Dancer::Request->new(env => { REQUEST_METHOD => "GET", REQUEST_URI => "/", PATH_INFO => "/", QUERY_STRING => "", HTTP_foo => "abc" })->header("foo")'
Can't call method "header" on an undefined value at /Users/mmcleric/perl5/perlbrew/perls/perl-5.16.1/lib/site_perl/5.16.3/Dancer/Request.pm line 92, <DATA> line 1003.
View moo-false-default.txt
$ perl -MData::Dumper -E 'use Moo; has "foo" => (is => "ro", default => sub { 0 }); has "bar" => (is => "ro", default => 0); say Dumper(main->new)'
$VAR1 = bless( {
'foo' => 0
}, 'main' );