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
#!/usr/bin/env perl | |
use warnings; | |
use strict; | |
use feature ':5.10'; | |
use File::Slurp qw/read_file write_file/; | |
# cut part of file with section name: $name. | |
# $part_name is only for debuging | |
sub part { |
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
#!/usr/bin/env ruby | |
require 'uri' | |
require 'net/http' | |
require 'pp' | |
uri = URI('https://blog.a1ex.wang') | |
h=Net::HTTP.new(uri.host,uri.port) | |
h.use_ssl=true | |
h.ca_file="ca.pem" |
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 CERTIFICATE----- | |
MIIHyTCCBbGgAwIBAgIBATANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJJTDEW | |
MBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwg | |
Q2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNh | |
dGlvbiBBdXRob3JpdHkwHhcNMDYwOTE3MTk0NjM2WhcNMzYwOTE3MTk0NjM2WjB9 | |
MQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMi | |
U2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3Rh | |
cnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUA | |
A4ICDwAwggIKAoICAQDBiNsJvGxGfHiflXu1M5DycmLWwTYgIiRezul38kMKogZk | |
pMyONvg45iPwbm2xPN1yo4UcodM9tDMr0y+v/uqwQVlntsQGfQqedIXWeUyAN3rf |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# autor: vitas@matfyz.cz | |
# licence: public domain | |
import re | |
import sys | |
# no atoi in python, really? | |
# atoi stolen from: http://www.codecodex.com/wiki/Base_conversion |
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
my @a;my $l=0;my $p=0; | |
while($a[$p]){if($l++ > 1_000_000){ return ();} | |
$p--;if($p<0) { return @a;} | |
$p--;if($p<0) { return @a;} | |
$p++; | |
while($a[$p]){if($l++ > 1_000_000){ return ();} | |
$a[$p]++; | |
$a[$p]++; | |
$a[$p]--; | |
} |
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
a[_<<>[++-]+<++>[>><_<<a_]--[<]]_>g]>-+-]_++]>[>]>[[><__>]]>]_+ | |
>>+>>>>+[>_>+>>[+]>>+_>>_+>]>>>-+[_<->>]]+_>>_-_+>+-_>>_>>>]+[> | |
>]>]]>>>-+_+>-+]>>-+-[+[-_>+->[+__><_]_]_>]+>_>-]++>>]>>+>_+-]> | |
-+>]>]_>-+>_+>>+_]_->>>-++->+>-]++->][]+>>>>>+-_>[]+>>+]->>+>>+ | |
>[]>]>-]+>>-]]_[+>+_>>-_+>_>]>-]++->>-><+]>>___]>+>>-+>>>_-+_>] | |
>]]]>+>]>_+->>_+-]>-+>+<]__][>[__]+>--<>_<<]<+<[<[-[< |
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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use utf8; | |
sub is_prime; | |
# index: 0 1 2 3 4 5 6 7 9 10 11 ... | |
# value: 0 0 1 1 0 1 0 1 0 0 1 ... |