Skip to content

Instantly share code, notes, and snippets.

View ibuki2003's full-sized avatar

Ibuki Sugiyama ibuki2003

View GitHub Profile
@ibuki2003
ibuki2003 / README.md
Last active March 30, 2026 10:27
PPMファイルを監視してリアルタイムに画像を見るやつ

ppmwatcher.py: PPMファイルを監視してリアルタイムに画像を見るやつ

CPU実験でレイトレの出力を見たいので作ったツールです

つかいかた

uv run ppmwatch.py out.ppm (必要package (pygame) が入ってれば他の実行形式でもいいとおもいます)

キー操作:

Keybase proof

I hereby claim:

  • I am ibuki2003 on github.
  • I am fuwa2003 (https://keybase.io/fuwa2003) on keybase.
  • I have a public key ASA2PCNP-JEP-ZRQmxvQbq-r7LgJjS-68-fnQmvktLnPqwo

To claim this, I am signing this object:

@ibuki2003
ibuki2003 / clang_with_flag.log
Last active August 4, 2021 01:50
OpenSiv3D build log
FAILED: CMakeFiles/Siv3D.dir/opt/OpenSiv3D/Siv3D/src/Siv3D/Polygon/SivPolygon.cpp.o
/usr/bin/clang++ -I/opt/OpenSiv3D/Linux/../Siv3D/include -I/opt/OpenSiv3D/Linux/../Siv3D/include/ThirdParty -I/opt/OpenSiv3D/Linux/../Siv3D/src -I/opt/OpenSiv3D/Linux/../Siv3D/src/Siv3D-Platform/Linux -I/opt/OpenSiv3D/Linux/../Siv3D/src/Siv3D-Platform/macOS_Linux -I/opt/OpenSiv3D/Linux/../Siv3D/src/Siv3D-Platform/OpenGL4 -I/opt/OpenSiv3D/Linux/../Siv3D/src/ThirdParty -I/opt/OpenSiv3D/Linux/../Siv3D/src/ThirdParty/asio -I/opt/OpenSiv3D/Linux/../Siv3D/src/ThirdParty/freetype -I/opt/OpenSiv3D/Linux/../Siv3D/src/ThirdParty/soloud/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/lzo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cloudproviders -I/usr
@ibuki2003
ibuki2003 / method_middleware.ts
Created July 31, 2020 19:18
aspida friendly method router for nextjs api route with *typescript mad science*
import { NextApiResponse, NextApiHandler } from "next";
import { TypedNextApiRequest } from "./typed_request";
import { AssertionError } from "assert";
type HttpMethod =
| "get"
| "head"
| "post"
| "put"
| "delete"
#!/bin/bash
if [ $# -lt 2 ]; then
echo "no enough args" >&2 # to stderr
exit 1
fi
if [ $1 != "dev" ] && [ $1 != "prod" ]; then
echo invalid env name: $1 >&2 # to stderr
echo should be '"dev"' or '"prod"' >&2 # to stderr
@ibuki2003
ibuki2003 / objdbg.ts
Created June 30, 2020 23:49
object debugger for typescript(and javascript)
/* eslint-disable @typescript-eslint/no-explicit-any */
class ObjDbg {
[key: string]: ObjDbg;
constructor(obj: any, path = "") {
return new Proxy<any>(this, {
get: (obj: any, key: string) => {
const ex = key in obj;
console.log("get", path, key, ex);
return ex ? new ObjDbg(obj[key], path + "/" + key) : undefined;
},
@ibuki2003
ibuki2003 / userscript.js
Created June 7, 2020 14:46
AtCoder Standings Customize panel fix script
// ==UserScript==
// @name AtCoder Customize Panel Fix
// @namespace https://fuwa.dev/
// @version 0.1
// @description fix standings customize panel
// @author ibuki2003
// @match https://atcoder.jp/contests/*/standings
// @grant none
// ==/UserScript==
import sys # sys.argvを見るのに使ってます。
class Inp: # ここでごにょごにょしてる
def __init__(self):
self.orig = input
self.buf = []
def __call__(self):
while not self.buf:
self.buf = self.orig().split('\n') # ここを書き換えるとスペースでも区切られるようになるのでsplitとかmapとかいちいちしなくてよくなる
return self.buf.pop(0)
@ibuki2003
ibuki2003 / template.cpp
Created July 27, 2019 14:58
オーバーロードとマクロがやかましい これが私の自称 テンプレです
#include<bits/stdc++.h>
using namespace std;using ll=long long;using vi=vector<int>;using vvi=vector<vi>;using vl=vector<ll>;using vvl=vector<vl>;using P=pair<int,int>;using PL=pair<ll,ll>;using vp=vector<P>;using vpl=vector<PL>;
template<typename T>constexpr auto inf=numeric_limits<T>::max()/2;
constexpr int INF=inf<int>,MOD=1000000007;constexpr ll LINF=inf<ll>;
#define _ol3(_1,_2,_3,name,...)name
#define _rep(i,n)_repi(i,0,n)
#define _repi(i,a,b)for(int i=a,i##_l=(b);i<i##_l;++i)
#define REP(...)_ol3(__VA_ARGS__,_repi,_rep,)(__VA_ARGS__)
#define REPR(i,n)for(int i=n-1;i>=0;--i)
#define REPA(i,v)REP(i,v.size())
情報: Webアプリケーションアーカイブ /var/lib/tomcat/webapps/gitbucket.war を配備します
7月 22, 2018 8:53:18 午後 org.apache.catalina.loader.WebappLoader buildClassPath
情報: Unknown loader jdk.internal.loader.ClassLoaders$AppClassLoader@1b9e1916 class jdk.internal.loader.ClassLoaders$AppClassLoader
7月 22, 2018 8:53:28 午後 org.apache.catalina.startup.TldConfig execute
情報: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
7月 22, 2018 8:53:37 午後 org.apache.catalina.core.StandardContext startInternal
重大: One or more listeners failed to start. Full details will be found in the appropriate container log file
7月 22, 2018 8:53:37 午後 org.apache.catalina.core.StandardContext startInternal
重大: 以前のエラーのためにコンテキストの起動が失敗しました [/gitbucket]
7月 22, 2018 8:53:37 午後 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc