Skip to content

Instantly share code, notes, and snippets.

View muan's full-sized avatar

Mu-An Chiou muan

View GitHub Profile
import SwiftUI
@main
struct MenuBarApp: App {
@NSApplicationDelegateAdaptor(StatusBarDelegate.self) var appDelegate
var body: some Scene {
WindowGroup {
ContentView()
@marcysutton
marcysutton / chrome-a11y-experiment-instructions.md
Last active January 31, 2023 22:07
Enable Chrome Accessibility Experiment

NOTE: This is no longer an experiment! You can use the accessibility inspector in Chrome Devtools now, including a fantastic color contrast inspection tool. Read more: https://developers.google.com/web/updates/2018/01/devtools#a11y


Just like any good element inspector helps you debug styles, accessibility inspection in the browser can help you debug HTML and ARIA exposed for assistive technologies such as screen readers. There's a similar tool in Safari (and reportedly one in Edge) but I like the Chrome one best.

As an internal Chrome experiment, this tool differs from the Accessibility Developer Tools extension in that it has privileged Accessibility API access and reports more information as a result. You can still use the audit feature in the Chrome Accessibility Developer Tools, or you could use the aXe Chrome extension. :)

To enable the accessibility inspector in Chrome stable:

@paulirish
paulirish / what-forces-layout.md
Last active May 6, 2024 05:08
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@nrrrdcore
nrrrdcore / 99_issues.md
Created August 21, 2013 01:25
A love rap to Mu-An that's more than 140 characters.

If you're having padding problems I feel bad for you son,
I got 99 issues in this repo,
and border-boxing ain't one.

screen shot 2013-08-20 at 6 24 35 pm

@mbostock
mbostock / .block
Last active May 30, 2023 11:51
Stroke Dash Interpolation
license: gpl-3.0
@despo
despo / the_command_line_is_your_friend.md
Last active December 16, 2015 11:59
Rails Girls London lightning talk - The command line is your friend

Rails Girls London logo Rails Girls London - 19th-20th April 2013

Commandline basics

Basic filestystem structure

.
|____home

| |____despo

@ymendel
ymendel / fishtank.html
Last active December 15, 2015 17:49
marquee fishtank — as seen at http://citizenx.cx/fishtank/
<html>
<head>
<title>Marquee Fishtank</title>
<style>
#fishtank {
width: 350px;
background-color: aqua;
}
#fish1 { color: red }
#fish2 { color: orange }