Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env node
import fs from "fs";
import { JSDOM } from "jsdom";
const content = fs.readFileSync("tmp/index.html", "utf8");
const dom = new JSDOM(content);
const todayEvents = dom.window.document.querySelector(
"#calendarAria .calendarDateBox",
);
for (const e of todayEvents.querySelectorAll("dl")) {
#!/usr/bin/env node
import fs from "fs";
import { JSDOM } from "jsdom";
const content = fs.readFileSync(process.argv[2], "utf8");
const dom = new JSDOM(content);
const res = dom.window.document.querySelectorAll("#maincontent article");
let result = [];
for (const r of res) {
const body = r.querySelector("section").innerHTML;

信託報酬

証券コード 信託報酬
1305 0.066%
1306 0.0968%
1308 0.0968%
1311 0.209%
1312 0.55%
1320 0.132%
time host rtt loss
1664565638 WEBARENA_IPV6 4.680 0
1664565647 ORACLE1_IPV4 171.541 0
1664565657 ORACLE2_IPV4 162.308 0
1664565666 WEBARENA_IPV4 5.406 0
1664566211 WEBARENA_IPV4 4.079 0
1664566220 WEBARENA_IPV6 4.384 0
1664566229 ORACLE2_IPV4 162.274 0
1664566238 ORACLE1_IPV4 171.567 0
1664569811 WEBARENA_IPV4 3.898 0
#!/usr/bin/perl
use strict;
use warnings;
use feature qw(:5.10);
use utf8;
# ipはダミー
my $WEBARENA_IPV4 = "203.0.113.1";
my $RESULT_FILE = "./out/rsync.csv";
#!/usr/bin/perl
use strict;
use warnings;
use feature qw(:5.10);
use utf8;
use List::Util;
# ipはダミー
my $WEBARENA_IPV4 = "203.0.113.1";
my $WEBARENA_IPV6 = "2001:db8::1";
import {
CloudWatchClient,
PutMetricDataCommand,
} from "@aws-sdk/client-cloudwatch";
const cw = new CloudWatchClient({ region: "ap-northeast-1" });
async function putcloudwatch(name, count) {
const metricname = `${ENV}:${name}`;
const params = {
MetricData: [
<?xml version="1.0" encoding="UTF-8" ?>
<feedback>
<report_metadata>
<org_name>google.com</org_name>
<email>[email protected]</email>
<extra_contact_info>https://support.google.com/a/answer/2466580</extra_contact_info>
<report_id>10525435579337670012</report_id>
<date_range>
<begin>1664064000</begin>
<end>1664150399</end>
#!/usr/bin/perl
use strict;
use warnings;
use feature qw(:5.10);
use utf8;
use JSON::PP;
use HTTP::Tiny;
<!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" />