Skip to content

Instantly share code, notes, and snippets.

Avatar
📬
Subscribe to my newsletter https://cheeaun.substack.com/

Chee Aun cheeaun

📬
Subscribe to my newsletter https://cheeaun.substack.com/
View GitHub Profile
View index.html
<!DOCTYPE html>
<html>
<head>
<title>Mapbox GL JS debug page</title>
<meta charset='utf-8'>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v2.12.0/mapbox-gl.css' rel='stylesheet' />
<style>
body {
@stuartbreckenridge
stuartbreckenridge / String+BusStopExpansion.swift
Created November 4, 2021 03:27
Expand abbreviated bus stop names
View String+BusStopExpansion.swift
extension String {
func expandName() -> String {
return self
.replacingOccurrences(of: "\\bA'space\\b", with: "Aerospace", options: [.regularExpression, .caseInsensitive])
.replacingOccurrences(of: "\\bAbly\\b", with: "Assembly", options: [.regularExpression, .caseInsensitive])
.replacingOccurrences(of: "\\bAc\\b", with: "Academy", options: [.regularExpression, .caseInsensitive])
.replacingOccurrences(of: "\\bAcad\\b", with: "Academy", options: [.regularExpression, .caseInsensitive])
.replacingOccurrences(of: "\\bAdm\\b", with: "Administration", options: [.regularExpression, .caseInsensitive])
.replacingOccurrences(of: "\\bAdvent\\b", with: "Adventist", options: [.regularExpression, .caseInsensitive])
.replacingOccurrences(of: "\\bAft\\b", with: "After", options: [.regularExpression, .caseInsensitive])
@akihikodaki
akihikodaki / README.en.md
Last active September 23, 2023 04:39
Linux Desktop on Apple Silicon in Practice
View README.en.md

Linux Desktop on Apple Silicon in Practice

I bought M1 MacBook Air. It is the fastest computer I have, and I have been a GNOME/GNU/Linux user for long time. It is obvious conclusion that I need practical Linux desktop environment on Apple Silicon.

Fortunately, Linux already works on Apple Silicon/M1. But how practical is it?

  • Two native ports exist.
@cheeaun
cheeaun / random-chmod-commands.txt
Last active August 26, 2022 08:37
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
@Jack-Works
Jack-Works / 2018.js
Last active January 22, 2023 11:53
cRAzY eSnEXt (*all* proposals mixed in)
View 2018.js
#! Aaaaaaaaaaa this is JS!!!
// https://github.com/tc39/proposal-hashbang
// This file is mixing all new syntaxes in the proposal in one file without considering syntax conflict or correct runtime semantics
// Enjoy!!!
// Created at Nov 23, 2018
for await(const x of (new A // https://github.com/tc39/proposal-pipeline-operator
|> do { // https://github.com/tc39/proposal-do-expressions
case(?) { // https://github.com/tc39/proposal-pattern-matching
when {val}: class {
@IanColdwater
IanColdwater / twittermute.txt
Last active September 25, 2023 01:46
Here are some terms to mute on Twitter to clean your timeline up a bit.
View twittermute.txt
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@jgravois
jgravois / .block
Last active January 1, 2022 06:33
Esri OSM vector tiles in mapbox-gl-js
View .block
license: apache-2.0
@oliveratgithub
oliveratgithub / emojis.json
Last active September 13, 2023 08:55
Emoji-list with emojis, names, shortcodes, unicode and html entities [massive list]
View emojis.json
{
"emojis": [
{"emoji": "👩‍👩‍👧‍👧", "name": "family: woman, woman, girl, girl", "shortname": ":woman_woman_girl_girl:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F467", "html": "&#128105;&zwj;&#128105;&zwj;&#128103;&zwj;&#128103;", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👧‍👦", "name": "family: woman, woman, girl, boy", "shortname": ":woman_woman_girl_boy:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F466", "html": "&#128105;&zwj;&#128105;&zwj;&#128103;&zwj;&#128102;", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👦‍👦", "name": "family: woman, woman, boy, boy", "shortname": ":woman_woman_boy_boy:", "unicode": "1F469 200D 1F469 200D 1F466 200D 1F466", "html": "&#128105;&zwj;&#128105;&zwj;&#128102;&zwj;&#128102;", "category": "People & Body (family)", "order": ""},
{"emoji": "👨‍👩‍👧‍👧", "name": "family: man, woman, girl, girl", "shortname": ":man_woman_girl_girl:", "unicode": "1F468 200D 1F469 200D 1F467 200D 1F467", "html": "&#128104;&zwj;&#128105;&z
@iantanwx
iantanwx / variance.ts
Created July 24, 2017 08:36
Variance Quirks in TypeScript
View variance.ts
interface Animal {
play(arg: Toy): Toy;
}
interface Dog extends Animal {
type: 'dog';
}
interface Cat extends Animal {
type: 'cat';