Skip to content

Instantly share code, notes, and snippets.

👷
I may be slow to respond.

karupanerura karupanerura

👷
I may be slow to respond.
Block or report user

Report or block karupanerura

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View try-schema-convert.pl
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__');
View perl530-subpattern.pl
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 "" =~ m!\p{nv= /(?x) \A [0-5] \z /}! ? "match!" : "mismatch!";
say "" =~ m!\p{nv= /(?x) \A [0-5] \z /}! ? "match!" : "mismatch!";
say "" =~ m!\p{nv= /(?x) \A [0-5] \z /}! ? "match!" : "mismatch!";
@karupanerura
karupanerura / example1.pl
Created Jun 18, 2019
TPCiP LT Executable Example Codes
View example1.pl
use strict;
use warnings;
use utf8;
use feature qw/say/;
use JSON::XS;
use B;
my $j = JSON::XS->new->allow_nonref;
View circle-text-svg.vue
<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
View list.inc
"foo", "bar", "baz"
@karupanerura
karupanerura / entrypoint.go
Created Dec 13, 2018
basic event loop example
View entrypoint.go
package main
import (
"fmt"
"time"
)
func entrypoint() {
fmt.Println("1")
setTimeout(func() {
@karupanerura
karupanerura / bench_arrayref.pl
Created Oct 16, 2018 — forked from kfly8/bench_arrayref.pl
Benchmark JSON::Encode
View bench_arrayref.pl
use strict;
use warnings;
use JSON::XS qw(encode_json);
use Benchmark qw(cmpthese);
my $obj = [ map {
+{
name => 'foo',
age => 123,
View tree.pl
use strict;
use warnings;
package Node {
use Class::Accessor::Lite ro => [qw/value children/], new => 1;
}
# DSL
package main {
sub node ($;&) { goto \&_node }
@karupanerura
karupanerura / wasm_fs.js
Created Sep 7, 2018
My golang webasm filesystem extension plactice
View wasm_fs.js
// override filesystem
global.fs = (() => {
class Locks {
constructor() {
this.rw = null;
this.ro = [];
}
getLock() {
if (this.rw !== null) {
View try.md
ウー! マンボー!
You can’t perform that action at this time.