Skip to content

Instantly share code, notes, and snippets.

@Jarred-Sumner
Jarred-Sumner / codemod.js
Last active Nov 10, 2020
Add import * as React from "react"; to the top of every TypeScript file
View codemod.js
const addImports = require("jscodeshift-add-imports");
module.exports = function (fileInfo, api, options) {
const j = api.jscodeshift;
const code = fileInfo.source;
const root = j(code);
addImports(root, [j.template.statement`import * as React from 'react'`]);
return root.toSource();
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Untitled benchmark</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
View YeetJSIUtils.h
//
// YeetJSIUTils.h
// yeet
//
// Created by Jarred WSumner on 1/30/20.
// Copyright © 2020 Facebook. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <jsi/jsi.h>
@Jarred-Sumner
Jarred-Sumner / Stylefile.yml
Created Aug 3, 2018
Customizations for news.ycombinator.com via StyleURL.
View Stylefile.yml
---
version: 1.0
domains:
- news.ycombinator.com
url_patterns:
- news.ycombinator.com/*
timestamp: '2018-08-03T19:55:08Z'
id: Jt3n
redirect_url: https://news.ycombinator.com/
shared_via: StyleURL - (https://www.styleurl.app) import and export CSS changes from
@Jarred-Sumner
Jarred-Sumner / Stylefile.yml
Created Aug 3, 2018
Customizations for news.ycombinator.com via StyleURL.
View Stylefile.yml
---
version: 1.0
domains:
- news.ycombinator.com
url_patterns:
- news.ycombinator.com/*
timestamp: '2018-08-03T04:34:57Z'
id: C2RH
redirect_url: https://news.ycombinator.com/
shared_via: StyleURL - (https://www.styleurl.app) import and export CSS changes from
@Jarred-Sumner
Jarred-Sumner / Stylefile.yml
Created Aug 3, 2018
Customizations for news.ycombinator.com via StyleURL.
View Stylefile.yml
---
version: 1.0
domains:
- news.ycombinator.com
url_patterns:
- news.ycombinator.com/*
timestamp: '2018-08-03T04:34:38Z'
id: kWzK
redirect_url: https://news.ycombinator.com/
shared_via: StyleURL - (https://www.styleurl.app) import and export CSS changes from
@Jarred-Sumner
Jarred-Sumner / Stylefile.yml
Created Aug 3, 2018
Customizations for www.facebook.com via StyleURL.
View Stylefile.yml
---
version: 1.0
domains:
- www.facebook.com
url_patterns:
- www.facebook.com/*
timestamp: '2018-08-03T02:23:59Z'
id: Zxc-
redirect_url: https://www.facebook.com/
shared_via: StyleURL - (https://www.styleurl.app) import and export CSS changes from
@Jarred-Sumner
Jarred-Sumner / Stylefile.yml
Created Aug 3, 2018
Customizations for www.facebook.com via StyleURL.
View Stylefile.yml
---
version: 1.0
domains:
- www.facebook.com
url_patterns:
- www.facebook.com/*
timestamp: '2018-08-03T02:23:03Z'
id: yKiY
redirect_url: https://www.facebook.com/
shared_via: StyleURL - (https://www.styleurl.app) import and export CSS changes from
@Jarred-Sumner
Jarred-Sumner / Stylefile.yml
Created Aug 3, 2018
Customizations for lattice.com via StyleURL.
View Stylefile.yml
---
version: 1.0
domains:
- lattice.com
url_patterns:
- lattice.com/*
timestamp: '2018-08-03T00:04:42Z'
id: 1Yeq
redirect_url: https://lattice.com/
shared_via: StyleURL - (https://www.styleurl.app) import and export CSS changes from
@Jarred-Sumner
Jarred-Sumner / Stylefile.yml
Last active Aug 2, 2018
Customizations for github.com via StyleURL.
View Stylefile.yml
---
version: 1.0
domains:
- github.com
url_patterns:
- github.com/*
timestamp: '2018-08-02T22:23:25Z'
id: wo3i
redirect_url: https://github.com/
shared_via: StyleURL - (https://www.styleurl.app) import and export CSS changes from