Skip to content

Instantly share code, notes, and snippets.

View iseki0's full-sized avatar
😇
kill me, please.

iseki iseki0

😇
kill me, please.
View GitHub Profile
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDR9koYPYQGSfr3k3DIxDK2Hvqg79g92q6t8fqGBSalebVAq5S0Y9GM/Ci5R1mi9QFibtSCaCKdnc1NZjL86iQq3YJmjbmnENDQZ3ymofiv/0v70cisao30xkBksMD+OvT+DQjwDY8wsfe+KwiN/Zb3ElsMGtRsCuQj2z/iNn1qXARXYd9siJYm/xI1Xx6OEjVCaCMsZYZF9dwjgEqZ7+GvAaZhTLQFDr2FURFcm+7wQB0zfymACwY/lbG09TGNxoirhuqlplnCbLagQ1X1U5zd0oZVt5sv9qf2rAxK5BEc1vI/GJm+DnFDnPaA7BdOba+M23Vcx/VfXUiETyFcCfXaAaCvP4tJizZIgg3rW5METaaNsOGmPrH2RouR9e604ZWMT1P8we2DFr+eT2lU3vZZAlhEERGyiwMQdrHDjXs5RCMA7/sEQ3hIKDuL0b1QfT3MROXw7vx50vZzerFbJu2Ot2MfvXLJ5juha6wXYbbPadtT6hu/CvwNI/ryutAIXqM= iseki@iseki-laptop-w
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC3mJhyxS/bMSsZGWUAg/V6SN+wuGwQZYtekOy/VGUCqfZzy50w5mO+jgXTrxX+JOuJoxW7ke2QZPK+K/AdF340cXwZcKqYEX+1IBk9P+XGhG5mfWlP638rouhy6P6CCxYyDiOTLnbBz5f+xabQwbpyNWqa7dEmgy+oWqKNiCKQZjmIc2+AE4YJSNo3+9gTEyrw2yjJIEPF657DzPltIpHZuZAWh5Jsm5uX56rEAl6J7QD1voE6PGgQz5T21gRmMYm9d1fM+Ex8KUBZlK7A+bh9o2UlxoxMFLg7oAFXkFdlcm5ORX9sJwsqfFeuArP1DO+9imJyaglp8bUdIG66swpt/pc9R3O1J/AeqvMx7NPc2T5GvLHL8kvS+ojLwMz47Dt9KzhAvHT4Mmd7NMbd9Ts6txamfT

Keybase proof

I hereby claim:

  • I am iseki0 on github.
  • I am iseki (https://keybase.io/iseki) on keybase.
  • I have a public key ASCIQtCiRe3ZLGmlH9XZeuk0VLt-Ljgqy5stPsPuBSr2Ugo

To claim this, I am signing this object:

import java.util.Objects;
record ServerTiming(String name, String desc, double dur) {
public ServerTiming {
Objects.requireNonNull(name);
}
public ServerTiming(String name, String desc) {
this(name, desc, Double.NaN);
}
@iseki0
iseki0 / Blog.java
Created August 5, 2023 16:28
给某个群友的 Mybatis 接收 PostgreSQL array 的例子
package org.mybatis.example;
import java.util.Arrays;
import java.util.List;
public class Blog {
public int[] getArr() {
return arr;
}
@iseki0
iseki0 / EmailRegex.md
Created May 26, 2023 16:21
Simple backup for 99% email regex

Because the site(https://emailregex.com) was down. I create a simple backup from wayback machine.

General Email Regex (RFC 5322 Official Standard)

(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])
@iseki0
iseki0 / build.gradle.kts
Last active April 20, 2023 18:49
Gradle template
plugins {
`kotlin-dsl`
idea
}
repositories {
mavenCentral()
gradlePluginPortal()
}
@file:Suppress("DuplicatedCode", "MemberVisibilityCanBePrivate", "DataClassPrivateConstructor")
import kotlinx.serialization.KSerializer
import kotlinx.serialization.Serializable
import kotlinx.serialization.descriptors.SerialDescriptor
import kotlinx.serialization.descriptors.serialDescriptor
import kotlinx.serialization.encoding.Decoder
import kotlinx.serialization.encoding.Encoder
import java.io.File
import java.io.InputStream
import java.io.Writer
class LineRecorder(
private val lineLength: Int = 120,
private val topLines: Int = 20,
private val bottomLines: Int = 30
) : Writer() {
init {
check(lineLength > 0)
check(topLines > 0)
@iseki0
iseki0 / socks5.kt
Last active March 21, 2023 17:38
SOCKS5 SocketFactory simple implementation
import java.io.EOFException
import java.io.InputStream
import java.io.OutputStream
import java.lang.IllegalArgumentException
import java.net.Inet4Address
import java.net.Inet6Address
import java.net.InetAddress
import java.net.Socket
import javax.net.SocketFactory
@iseki0
iseki0 / bash_strict_mode.md
Created March 3, 2023 18:02 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation