Skip to content

Instantly share code, notes, and snippets.

View melissamcewen's full-sized avatar

Melissa McEwen melissamcewen

View GitHub Profile
@Rich-Harris
Rich-Harris / service-workers.md
Last active June 23, 2025 19:36
Stuff I wish I'd known sooner about service workers

Stuff I wish I'd known sooner about service workers

I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.

I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.

Use Canary for development instead of Chrome stable

Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.

@alekseykulikov
alekseykulikov / index.md
Last active February 6, 2025 21:20
Principles we use to write CSS for modern browsers

Recently CSS has got a lot of negativity. But I would like to defend it and show, that with good naming convention CSS works pretty well.

My 3 developers team has just developed React.js application with 7668 lines of CSS (and just 2 !important). During one year of development we had 0 issues with CSS. No refactoring typos, no style leaks, no performance problems, possibly, it is the most stable part of our application.

Here are main principles we use to write CSS for modern (IE11+) browsers:

@KaraAJC
KaraAJC / components.md
Last active November 16, 2017 21:49
React Rules

Components

Components are an integral part of react. Every part or a react app, from an individual list item, to the app itself is setup as a component. there are a few ways to think about the structure of a component, and your major choices are: Class Component, or Function Component. React Docs on Components and Props

Class Components use:

Render()

the render function is made to determine what should be rendered to the dom, when the component is used. you should use a return block to set what will be returned from running render. This function is a requirement of a Component.

@sloanlance
sloanlance / jq_jsonl_conversion.md
Last active July 17, 2025 11:52
jq: JSONL ↔︎ JSON conversion

jq: JSONL ↔︎ JSON conversion

Prerequisites

  • jqhttps://jqlang.org/ — "like sed for JSON data"

    There are several options available for installing jq. I prefer to use Homebrew: brew install jq

  • JSONL → JSON