Skip to content

Instantly share code, notes, and snippets.

View count-task.pl
#!/usr/bin/perl
use strict;
use warnings;
use feature qw(:5.10);
use utf8;
use JSON::PP;
use HTTP::Tiny;
View slide.html
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8" />
<title>slide</title>
</head>
<body>
<p>
<span id="val"></span>
<input type="text" size="4" id="input" />
View slide.html
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8" />
<title>slide</title>
</head>
<body>
<p>
<span id="val"></span>
<input type="text" size="4" id="input" />
View Dockerfile
FROM debian:bullseye
RUN apt-get update && apt-get install -y \
apt-transport-https ca-certificates gnupg curl openssh-client jq liburi-perl
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | \
tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | \
apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && \
apt-get update -y && apt-get install google-cloud-sdk -y
View ingress.yaml
apiVersion: networking.gke.io/v1
kind: ManagedCertificate
metadata:
name: managed-cert
spec:
domains:
- budibase.example.jp
---
apiVersion: networking.gke.io/v1beta1
kind: FrontendConfig
View ingress.yml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"networking.k8s.io/v1","kind":"Ingress","metadata":{"annotations":{"kubernetes.io/ingress.class":"nginx","meta.helm.sh/release-name":"budibase","meta.helm.sh/release-namespace":"budibase"},"creationTimestamp":"2022-04-16T19:54:40Z","generation":1,"labels":{"app.kubernetes.io/instance":"budibase","app.kubernetes.io/managed-by":"Helm","app.kubernetes.io/name":"budibase","app.kubernetes.io/version":"1.0.48","helm.sh/chart":"budibase-0.2.8"},"name":"budibase-budibase","namespace":"budibase","resourceVersion":"4231","selfLink":"/apis/networking.k8s.io/v1/namespaces/budibase/ingresses/budibase-budibase","uid":"2c2c849b-6707-4c97-9c0d-f9b8d71d9f55"},"spec":{"rules":[{"host":"budibase.cloud.yaasita.net","http":{"paths":[{"backend":{"service":{"name":"proxy-service","port":{"number":10000}}},"path":"/","pathType":"Prefix"}]}}],"tls":[{"hosts":["budibase.cloud.yaasita.net"]
View index.js
#!/usr/bin/env node
"use strict";
const fs = require("fs");
const path = require("path");
const simpleParser = require("mailparser").simpleParser;
const zlib = require("zlib");
(async () => {
const targetDir = process.argv[2];
const dirents = fs.readdirSync(targetDir, { withFileTypes: true });
View blog.R
library(dplyr)
bandori <- read.csv("~/rwork/bandori.csv")
bandori <- bandori %>%
mutate(MISS = (FAST + SLOW) / (PERFECT + FAST + SLOW) * 100)
hist(bandori$MISS, breaks = seq(0, 20, 1))
dens <- density(bandori$MISS)
View bandori.csv
PERFECT FAST SLOW
453 17 13
509 6 9
284 40 2
463 30 12
460 15 9
406 14 24
665 21 29
306 16 4
566 18 23
View test.pl
#!/usr/bin/perl
use strict;
use warnings;
use feature qw(:5.10);
use utf8;
my ($A, $B, $C, $D) = (1, 3, 3, 7);
my @r = pattern(3);