Skip to content

Instantly share code, notes, and snippets.

View su8ru's full-sized avatar

subaru su8ru

View GitHub Profile
@su8ru
su8ru / moodle-utils.user.js
Last active May 7, 2023 08:06
Moodle を便利にする userscript / "Raw" ボタンからインストールできます / いらない機能があったらコメントアウトしてね
// ==UserScript==
// @name moodle-utils
// @namespace https://su8ru.dev/
// @version 0.3.1
// @description Make Moodle more useful
// @author subaru <contact@su8ru.dev>
// @supportURL https://su8ru.dev/
// @license MIT
// @match https://moodle.elms.hokudai.ac.jp/*
// @updateURL https://gist.github.com/su8ru/a37876a56cc7a2eb4384449034f081bb/raw/moodle-utils.user.js
@su8ru
su8ru / table.md
Last active November 4, 2022 22:36
AtCoder Clans に掲載されてるウェブサイトのうち、Heroku でホスティングされてそうなものリスト

Key Transition Statement

Date: 2022-08-19

I have recently set up a new OpenPGP key, and will be transitioning away from my old one.

The old key will continue to be valid for some time, but I prefer all future correspondence to come to the new one. I would also like this new key to be re-integrated into the web of trust. This message is signed by both keys to certify the transition.

The old key was:

@su8ru
su8ru / guestIdGenerator.ts
Last active August 19, 2021 16:30
generate guest ids
import yargs from "yargs";
import crypto from "crypto";
import fs from "fs";
const argv = yargs(process.argv)
.options({
count: {
type: "number",
demandOption: true,
description: "Number of IDs to be generated",
@su8ru
su8ru / thermographyRGB.ts
Created August 8, 2021 14:33
サーモグラフィ風の色変化をシグモイド関数で再現する - Qiita https://qiita.com/masato_ka/items/c178a53c51364703d70b
/**
* サーモグラフィ風の色変化をシグモイド関数で再現する - Qiita
* https://qiita.com/masato_ka/items/c178a53c51364703d70b
*/
const gain = 10;
const offsetX = 0.2;
const offsetGreen = 0.6;
const sigmoid = (_x: number, _gain = 1, _offsetX = 0) =>
@su8ru
su8ru / BootstrapIcon.tsx
Last active August 4, 2021 10:46
Material UI 環境で Bootstrap Icon をいい感じに使えるようにするコンポーネント
import React, { ComponentType, SVGAttributes } from "react";
import { SvgIcon, SvgIconProps } from "@material-ui/core";
// react-bootstrap-icons
interface BIProps extends SVGAttributes<SVGElement> {
color?: string;
size?: string | number;
}
type Icon = ComponentType<BIProps>;
@su8ru
su8ru / twitcasting-comment.css
Created November 16, 2020 14:09
ツイキャスこめんとの OBS 表示 自分用スタイルシート
body { background-color: rgba(0, 0, 0, 0); margin: 0px auto; overflow: hidden; line-height: 1.1; }
div#comment-list-app { display: flex; position: fixed; left: 10px; margin: 0; min-height: 0; max-width: none; min-width: 100vw; }
/* いろいろと非表示(1) */
#tcx_commentwindowheader_pc_responsive {display: none;}
#comment-list-app > div:nth-child(1) { display: none; }
.tw-player-page__comment__post {display: none;}
.tw-player-page__component__title {display: none;}
.alert-info {display: none;}
.alert {display: none;}
@su8ru
su8ru / swagger.yaml
Last active May 3, 2020 22:04
KO・S Train Location Back-end API Documentation
openapi: 3.0.0
info:
version: 1.0.0
title: KO・S Train Location Back-end
contact:
name: su8ru
email: contact@su8ru.dev
servers:
- url: https://kostl.su8ru.app
- url: http://localhost:8000 # for local test

Keybase proof

I hereby claim:

  • I am su8ru on github.
  • I am su8ru (https://keybase.io/su8ru) on keybase.
  • I have a public key whose fingerprint is 2356 A5BD 1BD7 A08D 0D2F E330 B1DC 7E5F 50CE F402

To claim this, I am signing this object:

\[\C\h:\m:\s\]\n\[\C'\y/\M/\D \A\]