Skip to content

Instantly share code, notes, and snippets.

View nahanil's full-sized avatar
💭
Find me by the tumtum tree

Jarrod nahanil

💭
Find me by the tumtum tree
View GitHub Profile
@nahanil
nahanil / rad.js
Last active February 28, 2021 03:52
Get a Chinese radical "by number"
/**
Get a Chinese radical "by number"
https://en.wikipedia.org/wiki/Kangxi_radical#Kangxi_Radicals_block
@param {uint8} idx positive integer
*/
function getRadicalByNumber(idx = 1) {
// oob check
if (idx < 1 || idx > 214) {
return ""
}
@nahanil
nahanil / qy.sql
Created January 15, 2022 12:57
sqlite: deduplicate
-- https://dba.stackexchange.com/a/116870
DELETE FROM sms WHERE rowid NOT IN (SELECT min(rowid) FROM sms GROUP BY address, body);