Skip to content

Instantly share code, notes, and snippets.

View j-f1's full-sized avatar
🥁
Instruments/profiling tools @apple

Jed Fox j-f1

🥁
Instruments/profiling tools @apple
View GitHub Profile
@jordansinger
jordansinger / Settings.swift
Created February 20, 2021 18:30
iOS 6 Settings built in SwiftUI
//
// Settings.swift
// Settings
//
// Created by Jordan Singer on 2/20/21.
//
import SwiftUI
struct Settings: View {
@tomhicks
tomhicks / plink-plonk.js
Last active March 18, 2024 02:23
Listen to your web pages
@threepointone
threepointone / for-snook.md
Last active August 26, 2023 15:43
For Snook

https://twitter.com/snookca/status/1073299331262889984?s=21

‪“‬In what way is JS any more maintainable than CSS? How does writing CSS in JS make it any more maintainable?”

‪Happy to chat about this. There’s an obvious disclaimer that there’s a cost to css-in-js solutions, but that cost is paid specifically for the benefits it brings; as such it’s useful for some usecases, and not meant as a replacement for all workflows. ‬

‪(These conversations always get heated on twitter, so please believe that I’m here to converse, not to convince. In return, I promise to listen to you too and change my opinions; I’ve had mad respect for you for years and would consider your feedback a gift. Also, some of the stuff I’m writing might seem obvious to you; I’m not trying to tell you if all people of some of the details, but it might be useful to someone else who bumps into this who doesn’t have context)‬

So the big deal about css-in-js (cij) is selectors.

A Redux Story

Developer: "Doo Doo Doo... Working on the new Redux rewrite. Gotta write some fetch actions..."

FETCH_USERS -> function fetchUsersAction() {...}
FETCH_PAGES -> function fetchPagesAction() {...}
FETCH_FRIENDS -> function fetchFriendsAction() {...}
FETCH_GROUPS -> function fetchGroupsAction() {...}
FETCH_EVENTS -> function fetchEventsAction() {...}
@AWegnerGitHub
AWegnerGitHub / Helios.md
Last active November 22, 2017 02:46
Helios proposal and architechture discussion for a centrally managed database for SmokeDetector

Here's the canonical TOML example from the TOML README, and a YAML version of the same. Which looks nicer?

title = "TOML Example"

[owner]

@vzsg
vzsg / revert-github-header.user.js
Created February 10, 2017 22:36
Userscript to revert GitHub header to the light version
// ==UserScript==
// @name Revert GitHub theme
// @namespace https://github.com
// @version 0.1
// @description try to take over the world!
// @author vzsg
// @match https://*.github.com/*
// @grant none
// ==/UserScript==
@travisjj
travisjj / topbarhover.js
Created February 9, 2017 20:38
Keeps the topbar open, also opens on hover
$('.secondary-nav a.-link').each(function(){this.removeAttribute("title");});
var btns = [];
var achieve = { btn: 'a.-link.js-achievements-button', mod: '.topbar-dialog.achievements-dialog.dno' };
btns.push(achieve);
var inbox = { btn: 'a.-link.js-inbox-button', mod: '.topbar-dialog.inbox-dialog.dno' };
btns.push(inbox);
var se = { btn: 'a.-link.js-site-switcher-button.js-gps-track', mod: '.topbar-dialog.siteSwitcher-dialog.dno' };
btns.push(se);
for( var ind in btns ){
var tar = btns[ind].btn;
const attributeExceptions = [
`role`,
];
function appendText(el, text) {
const textNode = document.createTextNode(text);
el.appendChild(textNode);
}
function appendArray(el, children) {