Skip to content

Instantly share code, notes, and snippets.

View AaronKow's full-sized avatar

Aaron Kow AaronKow

View GitHub Profile
@AaronKow
AaronKow / index.html
Created July 2, 2025 02:30
ASCII → RP2040 Sprite Converter
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>ASCII → RP2040 Sprite Converter</title>
<style>
body { font-family: system-ui, sans-serif; margin: 1rem; background: #f4f4f5; }
h1 { font-size: 1.5rem; margin-bottom: 1rem; }
textarea, pre { width: 100%; box-sizing: border-box; border: 1px solid #ddd; border-radius: 0.5rem; padding: 0.75rem; font-family: monospace; background: #fff; }
.....#####......
....#.....#.....
...##.##...#....
.##....##..#....
#.....###...#...
####........#...
.#..........#...
..######...#....
...##....#.#....
..#.#...#...#...
@AaronKow
AaronKow / puppeteer_example.js
Last active June 16, 2023 15:43
Puppeteer example
// import puppeteer library @^20.7.1
const puppeteer = require("puppeteer");
async function run() {
// First, we must launch a browser instance
const browser = await puppeteer.launch({
headless: true,
ignoreHTTPSErrors: true,
});
// then we need to start a browser tab

Installation

$ npx nuxi init <project-name>
$ cd <project-name>
$ yarn
$ yarn dev

# adding tailwind
$ yarn add --dev @nuxtjs/tailwindcss
@AaronKow
AaronKow / scripts.md
Last active December 24, 2022 15:42
Nuxt 2

Scripts

yarn create nuxt-app <project-name>
npx tailwindcss init

Reference

https://v2.color-mode.nuxtjs.org/
@AaronKow
AaronKow / discord-webhook.js
Created June 30, 2022 13:45 — forked from dmdboi/discord-webhook.js
An example gist to send Embed messages via Discord Webhooks
const axios = require("axios")
//An array of Discord Embeds.
let embeds = [
{
title: "Discord Webhook Example",
color: 5174599,
footer: {
text: `📅 ${date}`,
},
@AaronKow
AaronKow / tiptap.vue
Created June 21, 2022 19:48
TipTap in Vue example
<template>
<c-box v-if="editor">
<c-box
border="2px"
rounded="lg"
:border-color="
!disabled && required && isEmpty ? 'red.400' : $mode('black', 'white')
"
overflow="hidden"
>
@AaronKow
AaronKow / buffer-to-stream-conversion.js
Last active May 17, 2021 12:41
Buffer to stream conversion
const getStream = require('get-stream');
const toStream = require('buffer-to-stream');
(async () => {
const json = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ultricies orci at mauris lacinia, a mattis est convallis. Etiam ante odio, vehicula eget est a, egestas congue ligula. Duis nec pulvinar lacus. Aliquam non ligula ullamcorper, vulputate eros id, suscipit est. Nullam eget sem fringilla dui cursus aliquet eget ac lorem. Donec condimentum auctor risus, rhoncus pulvinar erat rhoncus id. Proin ac varius est, vel ullamcorper justo. Sed eu nulla fringilla, scelerisque odio sit amet, facilisis leo. In posuere maximus metus ut ultrices. Cras eu vulputate arcu, eu tincidunt urna. Vivamus id ex vitae ipsum tempus elementum. Sed ex nulla, consectetur sit amet convallis vitae, aliquam sit amet elit. Vivamus sit amet gravida sapien. Vivamus lectus eros, dapibus at vulputate ut, scelerisque sit amet nibh. Phasellus finibus magna mauris, in consectetur elit scelerisque quis. Nullam congue dignissim
@AaronKow
AaronKow / Bit_components_integration_notes.md
Last active December 7, 2021 08:56
Bit components integration notes
# Installation
$ yarn global add bit-bin

# Utility
$ bit --version
$ bit login
$ bit config
$ bit status
$ bit list
@AaronKow
AaronKow / scrollTo.js
Last active October 5, 2020 23:27
Vanilla Scroll to script
// Modified scrollTo by Aaron Kow
// Original taken from https://codepen.io/pawelgrzybek/pen/ZeomJB
// Blog: https://pawelgrzybek.com/page-scroll-in-vanilla-javascript/
// Good reference for scrollTop: https://levelup.gitconnected.com/scroll-to-the-top-of-page-1cce3446808
const scrollTo = (destination, duration = 200, easing = 'linear', offset, callback) => {
const easings = {
linear(t) {
return t;
},