Skip to content

Instantly share code, notes, and snippets.

View SlashNephy's full-sized avatar
🐳
docker compose up -d

SlashNephy

🐳
docker compose up -d
View GitHub Profile
@SlashNephy
SlashNephy / cleanup_archived_prs.sh
Created January 6, 2026 01:27
アーカイブ済みリポジトリ内の Open な Renovate / Dependabot の Issue / PR をクローズする
#!/bin/bash
# エラーが出たら止まる設定
set -e
echo "🤖 Renovate と Dependabot のお掃除を開始するよ!"
echo "--------------------------------------------------"
# 現在のユーザー名を取得
USERNAME=$(gh api user -q .login)
function avg(numbers) {
if (numbers.length === 0) {
return 0;
}
const sum = numbers.reduce((accumulator, currentValue) => accumulator + currentValue, 0);
return sum / numbers.length;
}
function bench(f, count) {
@SlashNephy
SlashNephy / ban-robots.js
Created June 24, 2024 04:05
すべてのクローラーをブロックする robots.txt を配信する Cloudflare Worker
const CONTENT = `
User-agent: *
Disallow: /
`.trim()
export default {
async fetch(request) {
const url = new URL(request.url);
if (url.pathname.endsWith('/robots.txt')) {
return new Response(CONTENT, {

Keybase proof

I hereby claim:

  • I am slashnephy on github.
  • I am slashnephy (https://keybase.io/slashnephy) on keybase.
  • I have a public key ASDa82R8lDIaPHAeUge6lnjP2NzENRQRJFLNXsQaSTiVpgo

To claim this, I am signing this object:

@file:Suppress("NOTHING_TO_INLINE")
import blue.starry.jsonkt.JsonObject
import blue.starry.jsonkt.delegation.*
import blue.starry.jsonkt.parseArray
import blue.starry.jsonkt.toJsonArray
import kotlinx.serialization.Serializable
import kotlinx.serialization.json.Json
import kotlinx.serialization.json.JsonArray
import kotlinx.serialization.json.decodeFromJsonElement