Skip to content

Instantly share code, notes, and snippets.

View FlandreDaisuki's full-sized avatar
🌈
世界にバグは不要です

Chun-Hao Lien FlandreDaisuki

🌈
世界にバグは不要です
View GitHub Profile
@mondaychen
mondaychen / 对 React 团队工作经历的思考.md
Last active April 30, 2024 05:12
对 React 团队工作经历的思考

对 React 团队工作经历的思考

今天在写2023的年终总结,再额外聊两句在 React Core team 的经历和反思吧,也算是正式画上句号了。

我在2022 年加入了 React,算是某种程度上实现了自己的梦想:加入这个在前端领域最有影响力的团队,真的很令人骄傲。可惜加入没多久,公司就开始 hire freeze,我在的 Dev Tooling 组原先说好5个 headcount 变成了两个,工作量却一点也没少。开会讨论我们组要做什么的时候,来了二三十个人,提了五六十个想法,个个都说要做行业标杆。而现实是作为 DevTools 最主要载体的 Chrome 扩展 API 和几个 moible 工具都在不断更新,光跟进维护和解决 bug 都够忙的了。我觍着脸开口问谁能贡献一部分时间来帮我们做一个项目,人人都面露难色。 大家也能感受到,工程师们都很希望自己使用的工具能变好,但是这个东西在 Meta 这家公司里是真的排不上优先级。其实不只 React DevTools,整个 React 组都是如此。只有跟公司重视的 VR 有关系的项目才能得到资源。团队里一些想重点发展 web 方向的核心成员,即使是 Seb 和 Andrew 这种级别,也只能另谋出路,跳槽去了 Vercel。

为什么 React 在 Meta 得不到资源

我和不少同样做前端的朋友都有这样的困惑:React 在 Meta 到处都用,在业界也为 Meta 带来了巨大的名望,这么重要的项目,为什么不能多投入一点资源呢?

Creating standalone ESM-based Node.js scripts on Unix and Windows

Approach:

  1. The file starts with shell code.
  2. That code uses Node.js to execute the file in ESM mode, after it removes the initial non-JavaScript lines.
    • Node.js does not currently have CLI flags for achieving what we do in this step. Therefore, we have to pipe to the node executable.

When editing this file, we want to use the JavaScript mode of our IDE or editor. Therefore, we try to “hide” the shell code from JavaScript as much as possible.

@m-radzikowski
m-radzikowski / script-template.sh
Last active June 25, 2024 12:02
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@tomhicks
tomhicks / plink-plonk.js
Last active March 18, 2024 02:23
Listen to your web pages
@mmis1000
mmis1000 / AbortablePromise.ts
Last active March 18, 2020 04:50
Abortable promise
import AbortController from "abort-controller"
import { AbortSignal } from "abort-controller"
import { AbortablePromise } from "."
var controller = new AbortController()
function sleep (signal: AbortSignal, time: number) {
return AbortablePromise(signal, function (resolve, reject, handleCancel) {
var id = setTimeout(resolve, time)
handleCancel(() => {
@x43x61x69
x43x61x69 / .bash_profile
Last active May 21, 2018 10:14
Check SSL Certificate Info via Linux/macOS Command Line
# You can place this into '.bash_profile' to make it more accessible.
# sslstatus google.com:443
sslstatus()
{
echo
a=(${1//:/ })
PORT=443
if [ "${#a[@]}" -ne 2 ]; then
#include <stdio.h>
#include <stdlib.h>
#include <printf.h>
struct widget {
size_t length;
size_t width;
};
@x43x61x69
x43x61x69 / README
Last active March 24, 2018 16:25
Starbucks (Taiwan) Email Validation RFC 2822 Compliant Fix
// Copyright (C) 2017 Zhi-Wei Cai.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
@bijij
bijij / viewimage.user.js
Last active March 3, 2024 16:28
Userscript version of the View Image chrome extension
// ==UserScript==
// @name View Image
// @namespace https://github.com/bijij/ViewImage
// @version 4.1.1
// @description This userscript re-implements the "View Image" and "Search by image" buttons into google images.
// @author Joshua B
// @run-at document-end
// @include http*://*.google.tld/search*tbm=isch*
// @include http*://*.google.tld/imgres*
// @updateURL https://gist.githubusercontent.com/bijij/58cc8cfc859331e4cf80210528a7b255/raw/viewimage.user.js
@dannvix
dannvix / NetflixSmallerSubtitles.js
Created February 4, 2018 09:06
Make the SVG-based subtitles smaller on Netflix web player
// Only applied for "image-based timed text" (i.e. SVG-based, like Chinese, Japanese, ...)
// For DFXP-based subtitles (e.g., English), try the hidden settings: https://www.netflix.com/SubtitlePreferences
(() => {
const installScaler = () => {
const subRectElem = document.querySelector('rect.image-based-subtitles-rect');
if (subRectElem) {
const subWrapperElem = subRectElem.parentNode;
const MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
const config = {attributes: true, childList: true, characterData: true, };