Skip to content

Instantly share code, notes, and snippets.

View hanford's full-sized avatar
🌝

Jack Hanford hanford

🌝
View GitHub Profile
import type { ListNode, ListType } from '@lexical/list';
import type { ElementNode } from 'lexical';
import type { ElementTransformer } from '@lexical/markdown';
import {
BOLD_ITALIC_STAR,
BOLD_ITALIC_UNDERSCORE,
BOLD_STAR,
BOLD_UNDERSCORE,
CHECK_LIST,
CODE,
// This proxy is only used for e2e
const proxy = require('express-http-proxy');
const express = require('express');
// const { parse } = require('url');
// const dev = process.env.NODE_ENV !== 'production';
// const handle = app.getRequestHandler();
const port = parseInt(process.env.PORT || 5900, 10);
diff --git a/node_modules/slate-react/dist/index.es.js b/node_modules/slate-react/dist/index.es.js
index 852c0a1..aa5a7e3 100644
--- a/node_modules/slate-react/dist/index.es.js
+++ b/node_modules/slate-react/dist/index.es.js
@@ -189,19 +189,19 @@ var Leaf = props => {
renderLeaf = props => /*#__PURE__*/React.createElement(DefaultLeaf, Object.assign({}, props))
} = props;
var placeholderRef = useRef(null);
- useEffect(() => {
- var placeholderEl = placeholderRef === null || placeholderRef === void 0 ? void 0 : placeholderRef.current;
// jscodeshift can take a parser, like "babel", "babylon", "flow", "ts", or "tsx"
// Read more: https://github.com/facebook/jscodeshift#parser
export const parser = "tsx";
export default function transformer(file, api) {
const j = api.jscodeshift;
const root = j(file.source);
// first collect all dazzle-type import specifiers
let dazzleImportSpecifierValues = [];
Record with timer:
ffmpeg -f avfoundation -s 1280x720 -i "1:0" -vf "drawtext=fontfile=/Users/hanford/Hellix-Black.otf:text='%{pts\:gmtime\:0\:%M\\\\\:%S}':fontcolor=white@1:borderw=8:bordercolor=black:x=w-tw-192:y=h-th-192:fontsize=230" no-bun-startup.mkv
crop video in two (left/right) parts:
ffmpeg -i bun-page.mp4 -filter_complex "[0]crop=iw/2:ih:0:0[left];[0]crop=iw/2:ih:ow:0[right]" -map "[left]" left.mp4 -map "[right]" right.mp4
Convert video from mkv to mp4
ffmpeg -i np-page.mkv -pix_fmt yuv420p np-page.mp4
export const parser = 'tsx';
// Press ctrl+space for code completion
export default function transformer(file, api) {
const j = api.jscodeshift;
const root = j(file.source);
const imports = root.find(j.ImportDeclaration);
if (imports.length) {
https://github.com/latticehr/lattice/commit/faaf8a20e149c2903a4cf68a54d3988430680249
https://github.com/latticehr/lattice/commit/0c289d439fa1bb8e6abfb8863d969a66f8b0f072
https://github.com/latticehr/lattice/commit/ad6c9dc7bb00209a2a3c425f59add96854184117
fail
https://github.com/latticehr/lattice/commit/ff0ddd0e1728b67dcab5b7ce34bc74fc29fc8670
https://github.com/latticehr/lattice/commit/07cf3788392798ff23754f950baf7c8a916e0e17
https://github.com/latticehr/lattice/commit/594c96ec48f56d105049e1400b25952ed9116c66
https://github.com/latticehr/lattice/commit/dbad2c72833fb2b3b645563be70d7d22e3c163f7
@hanford
hanford / tld.js
Created October 1, 2021 21:25
100 top tlds
[
".com",
".net",
".org",
".jp",
".de",
".uk",
".fr",
".br",
".it",
export const parser = 'tsx';
// Press ctrl+space for code completion
export default function transformer(file, api) {
const j = api.jscodeshift;
const root = j(file.source);
const imports = root.find(j.ImportDeclaration);
if (imports.length) {
/* eslint-enable no-param-reassign */
function genId() {
const num = uuid();
return `graphql__${num}`;
}
function uuid() {
return 'xxxxxxxx'.replace(/[xy]/g, function (c) {
var r = (Math.random() * 16) | 0,