Skip to content

Instantly share code, notes, and snippets.

View karupanerura's full-sized avatar
👷‍♂️
Please assign issue to me. but, I may be slow to respond.

karupanerura karupanerura

👷‍♂️
Please assign issue to me. but, I may be slow to respond.
View GitHub Profile
@karupanerura
karupanerura / render_machine_info.pl
Last active July 19, 2022 02:07
Usage: perl render_machine_info.pl isucon@$IP1 isucon@$IP2 isucon@$IP3
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use feature qw/say/;
use IPC::Cmd qw/run/;
use JSON::PP qw/decode_json/;
use List::Util qw/sum/;
use strict;
use warnings;
use feature qw/say/;
use JSON::PP;
use Time::Piece;
use POSIX qw/floor/;
my $events = do {
open my $fh, '<', 'events.json'
@karupanerura
karupanerura / client.go
Last active May 22, 2020 06:56
TCP stuck example
package main
import (
"bufio"
"io"
"log"
"net"
"sync"
"time"
)
@karupanerura
karupanerura / .eslintrc.js
Last active April 25, 2020 05:06
Does ESLint override breaks processor property?
const baseExtends = [
'eslint:recommended',
]
module.exports = {
env: {
browser: true,
node: true,
es6: true
},
% curl -vvv http://www.city.kawasaki.jp/
* Trying 202.214.115.96...
* TCP_NODELAY set
* Connected to www.city.kawasaki.jp (202.214.115.96) port 80 (#0)
> GET / HTTP/1.1
> Host: www.city.kawasaki.jp
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 200 OK
use strict;
use warnings;
use utf8;
use Path::Tiny qw/path/;
use JSON::Pointer;
use Cpanel::JSON::XS qw/decode_json/;
use Cpanel::JSON::XS::Type;
my $schema = decode_json(<<'__JSON__');
use strict;
use warnings;
use utf8;
use feature qw/say/;
no warnings qw/experimental::uniprop_wildcards/;
say "5" =~ m!\p{nv= /(?x) \A [0-5] \z /}! ? "match!" : "mismatch!";
say "5" =~ m!\p{nv= /(?x) \A [0-5] \z /}! ? "match!" : "mismatch!";
say "五" =~ m!\p{nv= /(?x) \A [0-5] \z /}! ? "match!" : "mismatch!";
say "6" =~ m!\p{nv= /(?x) \A [0-5] \z /}! ? "match!" : "mismatch!";
@karupanerura
karupanerura / example1.pl
Created June 18, 2019 19:35
TPCiP LT Executable Example Codes
use strict;
use warnings;
use utf8;
use feature qw/say/;
use JSON::XS;
use B;
my $j = JSON::XS->new->allow_nonref;
<template>
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
:viewBox="viewBox"
:style="{ maxWidth: boxSize + 'px' }"
>
<title v-text="text" />
<defs>
<path
@karupanerura
karupanerura / list.inc
Created January 28, 2019 14:36
list include
"foo", "bar", "baz"