Skip to content

Instantly share code, notes, and snippets.

View marcelocantos's full-sized avatar

Marcelo Cantos marcelocantos

  • Melbourne, Australia
View GitHub Profile
@marcelocantos
marcelocantos / chinese-text-tts.js
Created April 7, 2023 04:19
Tampermonkey script that adds an audio play button next to Chinese text
// ==UserScript==
// @name Chinese Text TTS
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Scans for Chinese text on a web page and adds a play button that triggers a text-to-speech service.
// @author You
// @match https://chat.openai.com/chat/*
// @grant none
// ==/UserScript==
@marcelocantos
marcelocantos / trie.py
Created November 7, 2022 02:11
Python radix trie
import collections
def jsonish(t):
match t:
case dict():
return {f"{k}": jsonish(v) for k, v in t.items()}
case _:
return f"{t}"
@marcelocantos
marcelocantos / gist:071cd4eb63e561fb3baf3fd2c151576c
Created July 27, 2022 11:59
Monosyllabic heternonyms in CEDICT
万 mo/wan
丌 ji/qi
丨 gun/shu
丱 guan/kuang
丷 ba/xx
丼 dong/jing
乀 fu/pie
乇 tuo/zhe
乘 cheng/sheng
乙 yi/zhe
@marcelocantos
marcelocantos / Xorg.0.log
Created December 15, 2019 02:46
Xorg log
[ 6.911] (--) Log file renamed from "/var/log/Xorg.pid-1374.log" to "/var/log/Xorg.0.log"
[ 6.912]
X.Org X Server 1.20.5
X Protocol Version 11, Revision 0
[ 6.912] Build Operating System: Linux 4.4.0-165-generic x86_64 Ubuntu
[ 6.912] Current Operating System: Linux duality 5.3.0-24-generic #26-Ubuntu SMP Thu Nov 14 01:33:18 UTC 2019 x86_64
[ 6.912] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.3.0-24-generic root=UUID=9afd12e2-f9fd-4c72-b584-a123b4e33bfd ro quiet splash vt.handoff=7
[ 6.912] Build Date: 08 October 2019 09:43:30AM
[ 6.912] xorg-server 2:1.20.5+git20191008-0ubuntu1 (For technical support please see http://www.ubuntu.com/support)
[ 6.912] Current version of pixman: 0.38.4

Keybase proof

I hereby claim:

  • I am marcelocantos on github.
  • I am marcelocantos (https://keybase.io/marcelocantos) on keybase.
  • I have a public key whose fingerprint is 3DEC 3298 C1A6 8852 3323 CC98 CD9A 26D2 0548 EBEC

To claim this, I am signing this object: