Skip to content

Instantly share code, notes, and snippets.

View ryanccn's full-sized avatar

Ryan Cao ryanccn

View GitHub Profile
@ryanccn
ryanccn / patch-ibm-plex.sh
Created August 24, 2023 16:45
Patch IBM Plex font families to use standard Medium and SemiBold naming instead of Medm and SmBld to improve compatibility
#! /usr/bin/env nix-shell
#! nix-shell --pure --keep DEBUG -i bash -p bash coreutils fd python311Packages.fonttools
# shellcheck shell=bash
set -eo pipefail
ansi_dim="\033[2m"
ansi_blue="\033[34m"
ansi_green="\033[32m"
ansi_reset="\033[0m"
@ryanccn
ryanccn / README.md
Last active September 21, 2022 03:53
An experiment with Modrinth and Carbon Ads, an open letter on the issue & a response from team

Modrinth Ad Experiment

Update 2022/9/20 🎉💯

The Modrinth team had contacted Carbon Ads, and as it turns out, Google DoubleClick integration could be turned off. So now DoubleClick is no longer present on the Modrinth website! 🎉🎉🎉

Thank you to the Modrinth team for prioritizing user privacy 😉

Update 2022/9/15

@ryanccn
ryanccn / mod.ts
Created August 10, 2021 06:18
Building a Unsplash Downloader with Deno https://ryanccn.dev/posts/deno-unsplash-downloader
import { writeAll } from 'https://deno.land/std@0.103.0/io/util.ts';
import pLimit from 'https://cdn.skypack.dev/p-limit?dts';
const exists = async (imgId: string) => {
try {
await Deno.stat(`./downloads/${imgId}.jpg`);
} catch {
return false;
}