Skip to content

Instantly share code, notes, and snippets.

View graphemecluster's full-sized avatar

graphemecluster graphemecluster

View GitHub Profile
@graphemecluster
graphemecluster / index.js
Created June 6, 2022 03:07
Code Golf - Interval between two musical notes
f=c=>{for(s=0,i=0;c[i];i++){x=c.charCodeAt(i);s+=i?((x^3024)%3-1)*(((x&12)==8)+1)*7:(x+1&15)*2%7}return s},d=(l,r)=>("mmmmPPPMMMM"[(s=f(r)-f(l))+5]||(s<0?"d":"A").repeat(-~(s<0?-s:s)/7))+(((s*4%7)+7)%7+1)
// > d("B#","Fb")
// "ddd5"
// Supported characters:
// CDEFGABcdefgabCDEFGABcdefgab
// 𝄫♭bb♮♯##𝄪xx
@graphemecluster
graphemecluster / PJCG gimste.css
Last active June 25, 2024 12:51
PJCG gimste (https://github.com/qq542vev/jihu-laho-zoi-pjcg-gimste-zoi) Lv.1 の Anki デッキのカードの CSS を独自に改変したものです。自分用ですが使いたい人はご自由に。
.card {
--backgruond-color1: #FFFFFF;
--backgruond-color2: #F0F0F0;
--foregruond-color1: #000000;
--foregruond-color2: #D0D0D0;
--code-typeans-color: var(--foregruond-color1);
--code-typeans-good-color: #80FF80;
--code-typeans-bad-color: #FF8080;
--code-typeans-missed-color: #D0D0D0;
--voksa-color: rgba(255, 255, 255, 0.7);
@graphemecluster
graphemecluster / en-GB-x-RP.tsv
Created July 16, 2024 10:12
An English word list with 123312 entries labelled with (British English) Received Pronunciation in the International Phonetic Alphabet generated by eSpeak NG (https://github.com/espeak-ng/espeak-ng). See https://opendata.stackexchange.com/a/21622/36521 for more details.
We can't make this file beautiful and searchable because it's too large.
A ˈe͡ɪ
A's ˈe͡ɪz
AA ˈɑː
AA's ˈɑː
AAA ˌe͡ɪˌe͡ɪˈe͡ɪ
AB ˈæb
AB's ˈæb
ABA ɐbˈæ
ABC ˌe͡ɪbˌiːsˈiː
ABC's ˌe͡ɪbˌiːsˈiːz

Statistics

Input Letter Count (Case-Insensitive)

{
  "s": 117445,