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
@j-f1
j-f1 / LICENSE
Last active October 7, 2022 06:52
MIT License
Copyright (c) 2021 Jed Fox
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@j-f1
j-f1 / messenger-native-emoji.js
Last active December 1, 2020 15:41
Replace the emoji on the Messenger website with the platform’s native ones
// ==UserScript==
// @name Messenger Native Emoji
// @namespace http://jedfox.com/
// @version 1.0
// @description Use native emoji on Messenger
// @author Jed Fox
// @match *://*.messenger.com/*
// @grant GM_addScript
// ==/UserScript==
@j-f1
j-f1 / plink-plonk.js
Created February 15, 2020 19:36 — forked from tomhicks/plink-plonk.js
Listen to your web pages
@j-f1
j-f1 / install-charcoal-scripts.js
Last active August 8, 2018 22:00
Temporarily install various Charcoal userscripts on a chat page
load(
'https://charcoal-se.org/userscripts/vendor/debug.min.js',
[
'https://cdn.rawgit.com/joewalnes/reconnecting-websocket/fd7c819bb15eeee3452c17e317c0a3664c442965/reconnecting-websocket.min.js',
'https://charcoal-se.org/userscripts/autoflagging/autoflagging.user.js'
],
'https://charcoal-se.org/userscripts/fire/fire.user.js',
[
'https://charcoal-se.org/userscripts/vendor/actioncable.min.js',
'https://charcoal-se.org/userscripts/sds/sds.user.js'
@j-f1
j-f1 / accounts.md
Last active November 18, 2019 22:32
My various accounts “around the web”
@j-f1
j-f1 / eslint-rule-sort-imports-by-length.js
Created August 9, 2017 22:29
Require sorting imports by length
export default function(context) {
const fileSource = context.eslint.sourceCode.text
return {
ImportDeclaration(node) {
const idx = node.parent.body.indexOf(node)
const line = node.loc.start.line
if (idx > 0) {
const prevNode = node.parent.body[idx - 1]
if (line - prevNode.loc.end.line < 2) {
@j-f1
j-f1 / shrink-footer.css
Last active June 28, 2017 12:41
Shrink the Stack Exchange footer — https://stackapps.com/q/7091/34727
@j-f1
j-f1 / .hyper.js
Created June 9, 2017 20:26
Hyper settings
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
@j-f1
j-f1 / babel-plugin-add-bunyan-metadata.js
Last active May 7, 2017 13:07
Add Bunyan source metadata at compile-time without the performance hit
export default function (babel) {
const { types: t } = babel;
return {
visitor: {
CallExpression(path) {
if (!t.isMemberExpression(path.node.callee)
|| path.node.callee.object.name !== 'log') {
return
}
@j-f1
j-f1 / README.md
Last active April 17, 2017 10:48
babel-plugin-inline-array-methods

Inline Array Methods

A Babel plugin to inline methods on array literals.

Warning: If you have getters on objects in arrays, this could be lossy.
Example:

const x = { get a () { someSideEffect(); return 2 } };
[x.a].length;
// transforms to