SUBSYSTEMS=="usb", ATTRS{idVendor}=="", ATTRS{idProduct}=="", GROUP="cdrom", MODE="0666" |
function useWeakRef<T>(value: T): React.MutableRefObject<T> { | |
const ref = useRef(value); | |
useEffect(() => { | |
ref.current = value; | |
}, [value]); | |
return ref; | |
} | |
function useByrefCallback<Args extends unknown[], Result>( | |
callback: (...args: Args) => Result, |
#!/usr/bin/env python | |
# encoding: utf-8 | |
""" | |
pbj | |
Pretty-print whatever JSON is currently in the pasteboard and view it in your pager of choice | |
USAGE | |
pbj [-c] [-m] |
# (c) 2020 Humu | |
# MIT License | |
from typing import Any | |
import github | |
AUTOMERGE_LABEL_NAME = 'automerge' | |
Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
ActivityTweet | |
generic_activity_highlights | |
generic_activity_momentsbreaking | |
RankedOrganicTweet | |
suggest_activity | |
suggest_activity_feed | |
suggest_activity_highlights | |
suggest_activity_tweet |
Here's a neat trick.
I treat my git clones as disposable between computers, but keep my project-specific dotfiles (usually containing environment variables, individual configurations, and so on) synced across devices in iCloud. Then, this script is just a matter of adding symlinks for each of the dotfiles I've saved for each of my projects to each of their clones.
So if my dotfiles are saved like this:
$ tree -a ~/icloud-drive/dotfiles/project-dotfiles/
/Users/justin/icloud-drive/dotfiles/project-dotfiles/
├── searls
const {useCallback, useEffect, useReducer, useRef} = require('react'); | |
let effectCapture = null; | |
exports.useReducerWithEmitEffect = function(reducer, initialArg, init) { | |
let updateCounter = useRef(0); | |
let wrappedReducer = useCallback(function(oldWrappedState, action) { | |
effectCapture = []; | |
try { | |
let newState = reducer(oldWrappedState.state, action.action); |
node_modules | |
comments.json | |
comments.md |
Hey everyone - this is not just a one off thing, there are likely to be many other modules in your dependency trees that are now a burden to their authors. I didn't create this code for altruistic motivations, I created it for fun. I was learning, and learning is fun. I gave it away because it was easy to do so, and because sharing helps learning too. I think most of the small modules on npm were created for reasons like this. However, that was a long time ago. I've since moved on from this module and moved on from that thing too and in the process of moving on from that as well. I've written way better modules than this, the internet just hasn't fully caught up.
@broros
otherwise why would he hand over a popular package to a stranger?
If it's not fun anymore, you get literally nothing from maintaining a popular package.
One time, I was working as a dishwasher in a restu