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 / sticky.css
Last active February 23, 2017 13:55
Make all kinds of things stick to the edges of the screen on GitHub
.file-header,
.discussion-sidebar,
.dashboard-sidebar,
.comment-reactions,
/* .commit-tease, */
.review-thread-reply,
.user-profile-repo-filter,
.timeline-comment-header,
#wiki-rightbar,
.table-list-header,
@j-f1
j-f1 / keybase.md
Created February 13, 2017 17:46
Keybase Proof

Keybase proof

I hereby claim:

  • I am j-f1 on github.
  • I am j_f (https://keybase.io/j_f) on keybase.
  • I have a public key ASDP4ZOty1cZs_hiUV3tHl-AUC_crezmEtI9y4RQKbf1qgo

To claim this, I am signing this object:

@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
@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 / .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 / 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 / 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 / accounts.md
Last active November 18, 2019 22:32
My various accounts “around the web”
@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 / plink-plonk.js
Created February 15, 2020 19:36 — forked from tomhicks/plink-plonk.js
Listen to your web pages