Skip to content

Instantly share code, notes, and snippets.

Avatar
🤯
Being in school

Ryan Cao ryanccn

🤯
Being in school
View GitHub Profile
@ryanccn
ryanccn / README.md
Last active Sep 21, 2022
An experiment with Modrinth and Carbon Ads, an open letter on the issue & a response from team
View README.md

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

View mod.ts
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;
}
@ryanccn
ryanccn / uninstall.ts
Created May 10, 2021
Better `brew uninstall`
View uninstall.ts
import {
bold,
brightRed,
gray,
green,
} from "https://deno.land/std/fmt/colors.ts";
const packageName = Deno.args[0];
const logPrefix = gray("(brew-uninstall)");