Skip to content

Instantly share code, notes, and snippets.

View koteitan's full-sized avatar

koteitan koteitan

View GitHub Profile
@koteitan
koteitan / README.md
Last active January 7, 2024 04:51
Color theme Petan in Rabbit - https://syusui-s.github.io/rabbit/#/

Color theme Petan in Rabbit

  • これは何?

    • これはぺぇたん petan のイラストをイメージして作られた Rabbit 用のカラーテーマです。
    • Rabbit は nostr クライアントです。
    • nostr は新しい SNS プロトコルです。
  • インストールのしかた

  • stylus という CSS を貼り替える Chrome 拡張をインストールしてください

@koteitan
koteitan / CustomEmojiList.md
Created May 25, 2023 14:09 — forked from SnowCait/CustomEmojiList.md
Custom Emoji List proposal

Custom Emoji List

Purpose

To share custom emoji list between clients and/or devices.

Specification

  • kind 30002
  • tags
@koteitan
koteitan / nostr-one-liner-client
Last active April 18, 2023 19:01
nostr-one-liner-client
#!/bin/bash
echo '["REQ","345",{"authors":["'$mypub'"],"kinds":[3],"limit":1}]' |\
websocat $prirelay | head -1 |\
jq -rc '["REQ","345",{"authors":[.[2].tags[0:40][][1]],"kinds":[1],"limit":20}]' |\
websocat $prirelay | jq -rc '{pubkey:.[2].pubkey|scan("^......"),time:(.[2].created_at|localtime|strflocaltime("%Y/%m/%d %H:%M:%S")),content:.[2].content}'
@koteitan
koteitan / list-relays.bash
Created April 18, 2023 16:29
relay-listing jq
echo '["REQ","345",{"authors":["'$mypub'"],"kinds":[3],"limit":1}]' | websocat $prirelay |\
head -1 | jq -r .[2].content | jq -r 'keys_unsorted[] as $k | [$k, .[$k]] | .[0]'
@koteitan
koteitan / nostr-nip-39.txt
Created March 11, 2023 13:11
nostr NIP-39 proof for github
npub1f3w4x7dqvceeez8kuyq78md3lwhwfm0ra634llr0r3nykwjrs0hqvldhgk
@koteitan
koteitan / BM3.3.yab
Created June 22, 2019 04:01
Idealized BMS BM3.3
REM Compute A matrix
A_{r,t}=1
for x=r+1 to X-1
if A_{P_t(x),t}=1 then A_{x,t}=1 endif
next x
for x=r to X-1
if A_{x,t}=1 then
for y=1 to t
@koteitan
koteitan / main.c
Created March 6, 2019 18:08
helloworld in C created by koteitan - https://repl.it/@koteitan/helloworld-in-C
#include <stdio.h>
int main(void) {
printf("Hello World\n");
return 0;
}
@koteitan
koteitan / Helix-pico-for-Lefthand-only.kbd.json
Last active December 16, 2018 17:30
Helix pico for Lefthand only
[
{
"name": "Helix pico for Lefthand only",
"author": "koteitan"
},
[
{
"fa": [
0,
0,
@koteitan
koteitan / circlecollision.m
Last active October 13, 2018 19:58
test collision of circle and squares recurcively
% for Matlab 2016b
depth=12;
close all;
fig=figure('Position',[0 -200 1024 1024]);
testsqr(0,1,0,1,depth);
% draw circle
hold on;
@koteitan
koteitan / Graph for FSC
Created September 24, 2018 17:28
Graph for FSC calculation
% try on https://dreampuf.github.io/GraphvizOnline/
digraph G {
"log v(j+1)-v(j)=log k(j)\nt(j)=v(j+4)\nlogk(j+1)=k(j), k(j+1)=2^{k(j)}"
->"v(j)"
->"Ж(j)=v(0)v(1)...v(j)"
->"Ж(j)"
-> "Ж=lim[j→∞] Ж(j)\nЖ=lim[j→∞] Ж(j+4)"
-> Ж
->"Ч/γ=Ж/π";
"T=(t_-)^−1◦(t_+)^-1"->T->"Ч=T(γ)"->Ч->"Ч/γ=Ж/π";