Skip to content

Instantly share code, notes, and snippets.

Avatar
🗞️
Subscribe to my newsletter! https://www.getrevue.co/profile/cheeaun

Chee Aun cheeaun

🗞️
Subscribe to my newsletter! https://www.getrevue.co/profile/cheeaun
View GitHub Profile
View crowd-density-1.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 49 columns, instead of 36. in line 8.
Code,0000,0030,0100,0130,0200,0230,0300,0330,0400,0430,0500,0530,0600,0630,0700,0730,0800,0830,0900,0930,1000,1030,1100,1130,1200,1230,1300,1330,1400,1430,1500,1530,1600,1630,1700,1730,1800,1830,1900,1930,2000,2030,2100,2130,2200,2230,2300,2330
CC1,l,l,l,l,l,l,l,l,l,l,l,l,l,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,l,m,l,l,l,l
CC10,l,l,l,l,l,l,l,l,l,l,l,l,l,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,l,m,l,l,l,l
CC11,l,l,l,l,l,l,l,l,l,l,l,l,l,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,l,m,l,l,l,l
CC12,l,l,l,l,l,l,l,l,l,l,l,l,l,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,l,m,l,l,l,l
CC13,l,l,l,l,l,l,l,l,l,l,l,l,l,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,l,m,l,l,l,l
CC14,l,l,l,l,l,l,l,l,l,l,l,l,l,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,l,m,l,l,l,l
CC15,l,l,l,l,l,l,l,l,l,l,l,l,l,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,l,m,l,l,l,l
CC16,l,l,l,l,l,l,l,l,l,l,l,l,l,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,
@cheeaun
cheeaun / mapbpx-tiles3dloader.js
Created Oct 9, 2021
Mapbox GL JS + Deck.gl Tiles3DLoader example
View mapbpx-tiles3dloader.js
import MapboxLayer from '@deck.gl/mapbox/dist/esm/mapbox-layer';
import { Tiles3DLoader } from '@loaders.gl/3d-tiles';
import { Tile3DLayer } from '@deck.gl/geo-layers';
const buildingsLayer = new MapboxLayer({
id: 'buildings',
type: Tile3DLayer,
data: 'URL TO tileset.json',
loader: Tiles3DLoader,
loadOptions: {
View TimeSymbol.jsx
export default function TimeSymbol({ type = 'wd' }) {
const count = 3;
const size = 6;
const gutter = 1;
const typeHighlights = {
wd: [0, 1, 0],
sat: [0, 0, 1],
sun: [1, 0, 0],
}[type.toLowerCase()];
const typeColor = {
@cheeaun
cheeaun / README.md
Last active Aug 10, 2021
Karabiner script to map new Macbook Globe🌐/fn key to open Mumu emoji picker
View README.md
@cheeaun
cheeaun / youtube-dl-specific-format.md
Last active Jun 8, 2021
youtube-dl download specifc format
View youtube-dl-specific-format.md
  1. youtube-dl -F VIDEO_ID - shows a list of formats available with codes in the first column
  2. youtube-dl -f FORMAT_CODE VIDEO_ID - specify the format code and download the exact format
View ocr.sh
#!/bin/bash
# Dependency: requires macOCR
# Download: https://github.com/schappim/macOCR
# @raycast.schemaVersion 1
# @raycast.title macOCR
# @raycast.mode silent
# @raycast.author Lim Chee Aun
# @raycast.authorURL https://github.com/cheeaun
@cheeaun
cheeaun / polyline.svg
Created Apr 29, 2021
Render encoded polyline on SVG: polyline.svg#[ENCODED_POLYLINE_STRING]
View polyline.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cheeaun
cheeaun / random-chmod-commands.txt
Last active Jan 6, 2022
Random chmod commands
View random-chmod-commands.txt
Set all files to 644
> find . -type f -exec chmod 644 {} \;
Set all folders to 755
> find . -type d -exec chmod 755 {} \;
Set all .bin files to executable
> chmod +x node_modules/.bin/*
Find all .bin files
View wishes.csv
We can't make this file beautiful and searchable because it's too large.
name,content,lng,lat
yy,Happy birthday Singapore!! Thank you Moments of Life team for creating this!,103.762,1.354
wj,Happy Birthday Singapore!,103.8,1.274
Cindy Lim Qiu Xia,Happy birthday to Singapore .,103.885,1.326
GJ,Happy Birthday Singapore!,103.873,1.368
Alexa,"Thanks for being there for my yesterdays, for growing with me into my today, and for giving me hope towards my tomorrow. Happy 55th and to more glorious years ahead! 😍 🇸🇬",103.806,1.443
GJ,Happy Birthday Singapore!!,103.873,1.368
Tanglin Boy,I love Singapore from the bottom of my heart! Happy National Day!,103.79851,1.2992
Tom,HBD Singapore!,103.80249,1.27221
z,"Happy Birthday, Singapore!",103.93579,1.36536