Skip to content

Instantly share code, notes, and snippets.

View sugyan's full-sized avatar
🏠
Working from home

Yoshihiro Sugi sugyan

🏠
Working from home
View GitHub Profile
const express = require('express');
const fs = require('fs');
const path = require('path');
const os = require('os');
const app = express();
const PORT = process.env.PORT || 3000;
class ChatLogParser {
constructor() {
import { createServer, IncomingMessage, ServerResponse } from "http";
import { createHash, randomBytes } from "node:crypto";
import { Key } from "@atproto/jwk";
import {
OAuthClient,
InternalStateData,
Session,
DigestAlgorithm,
} from "@atproto/oauth-client";
import { AtprotoHandleResolverNode } from "@atproto-labs/handle-resolver-node";
@sugyan
sugyan / 1.pl
Created February 13, 2024 03:37
YAPC::Hiroshima 2024 Perlbatross
(chop,utf8::decode$_)^print/(\X)\X?/g,$",/\X(\X)/g,$/for<>
use std::fmt::{Display, Formatter, Result, Write};
#[derive(Clone, Copy, PartialEq, Eq)]
enum Op {
Add,
Sub,
Mul,
Div,
}
#![feature(test)]
extern crate test;
const NUM_ITER: usize = 10;
#[allow(dead_code)]
#[inline(always)]
fn pop_lsb(n: &mut u64) -> u32 {
let ret = n.trailing_zeros();
*n = *n & n.wrapping_sub(1);
This file has been truncated, but you can view the full file.
+1523KE: ▲2三桂右不成
+3523KE: ▲2三桂左不成
+1624KE: ▲2四桂右
+3624KE: ▲2四桂左
+1725KE: ▲2五桂右
+3725KE: ▲2五桂左
+1826KE: ▲2六桂右
package main
import (
"encoding/xml"
"io"
"log"
"net/http"
"time"
)
package main
import (
"context"
"encoding/json"
"log"
"golang.org/x/oauth2"
"golang.org/x/oauth2/fitbit"
)
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"strings"
"golang.org/x/oauth2/clientcredentials"
package app
import (
"bytes"
"image/gif"
"image/jpeg"
"image/png"
"net/http"
"path"
"strings"