Skip to content

Instantly share code, notes, and snippets.


Jessica Franco Jessidhia

  • @pixiv Inc, pixiv desktop
  • Tokyo, Japan
View GitHub Profile
View jnb.user.js
// @ts-check
// ==UserScript==
// @name PayPay Bank CSV Export
// @match*
// @icon
// @grant GM.setValue
// @grant GM.getValue
// @noframes
// @updateURL
// @version 2.0
Jessidhia / useSelector.js
Last active Jan 24, 2020
useSelector refactoring
View useSelector.js
function useSelectorWithStoreAndSubscription(
) {
const subscription = useMemo(() => new Subscription(store, contextSub), [
Jessidhia / super-deprecate.ts
Created Jun 10, 2019
Trivial webpack plugin / inline function to fail build if something is imported
View super-deprecate.ts
* Put in webpack's resolve.plugins[], direct reference.
* For example, `resolve: { plugins: [superDeprecate] }`.
function superDeprecate(this: any) {
// request is the module name as written in the "import" declaration/expression / "require" call
// issuer is the absolute path to the file making the request
// I don't remember what path is
interface ResolveQuery {
Jessidhia /
Last active Aug 31, 2022
Implementation notes on react's scheduling model as of (shortly before) 16.8.0

Implementation notes on react's scheduling model as of (shortly before) 16.8.0

While the public API intended for users to use is the scheduler package, the reconciler currently does not use scheduler's priority classes internally.

ReactFiberScheduler has its own internal "mini-scheduler" that uses the scheduler package indirectly for its deadline-capable scheduleCallback.

This is kind of a documentation of implementation details that I suppose will be gone by the end of the year, but what can you do.

View suica-script.user.js
// @ts-check
// ==UserScript==
// @name Export Suica transactions to CSV
// @namespace
// @version 0.2
// @icon
// @description Export Suica transactions to CSV
// @updateURL
// @author Jessidhia
// @include*
View connected-react-router.tsx
// A simplified replacement for react-router-redux
// that works with react-redux@^6 and with react-router@^4.4
// Uses hooks, so requires react@^16.7
import {
Action as LocationAction,
Jessidhia / mui-styled.tsx
Last active Nov 3, 2018
TypeScript implementation of a styled-components-like API for material-ui's withStyles
View mui-styled.tsx
import React from 'react'
import {
} from '@material-ui/core/styles'
import cx from 'classnames'
import {
View roleBot.ts
import Discord from 'discord.js'
const messageConfig: Map<string, EmojiRoleMap> = new Map([
// ['messageId', Map<'emoji id', 'role name'>]
new Map<string, string>([
// TO-CHECK: discord.js v12 might drop the emoji name from the identifier
// ['emoji id', 'role name']
// this order is the same as the order in
View b.mjs
import * as index './index.mjs'
export function calculate () {
return index.calculate()
Jessidhia / .babelrc.js
Created Nov 4, 2017
Hack for testing the ESM hook
View .babelrc.js
module.exports = {
presets: ['@babel/react']