Cheap-ish fonts
A list of cheap-ish fonts, that doesn't put a dent in my wallet.
function BetterFixedLazyExample({ lazyValue }) { | |
// Initialize with null value. | |
const myRef = useRef(null); | |
useLayoutEffect(() => { | |
console.log(myRef.current); // => HTMLDivElement DOM node | |
}, []); | |
// Make sure the ref setter is not blocked by conditionals. | |
return ( |
import React from 'react'; | |
import { createBrowserHistory } from 'history'; | |
export const historyContext = React.createContext(null); | |
const HistoryContextProvider = historyContext.Provider; | |
// This is initialized at the time the file/module is imported, and not on component mount. | |
const history = createBrowserHistory(); | |
export function History(props) { |
A list of cheap-ish fonts, that doesn't put a dent in my wallet.
Prefix | Description | Notes | |
---|---|---|---|
sk_live_ | Live secret key | Secret key in a live environment. | |
pk_live_ | Live public key | Public key in a live environment. | |
pst_live_ | Live Connection token | Connection token in a live environment. | |
sk_test_ | Test secret key | Pecret key in a test environment. | |
pk_test_ | Test public key | Public key in a test environment. | |
pst_test_ | Test Connection token | Connection token in a test environment. | |
ac_ | Platform Client ID | Identifier for an auth code/client id. | |
acct_ | Account ID | Identifier for an Account object. | |
ch_ | Charge ID | Identifier for a Charge object. |
# Query order pattern from GitHub GraphQL API | |
# Can be used in conjunction with Relay pagination. | |
""" | |
Possible directions in which to order a list of items when provided an `orderBy` argument. | |
""" | |
enum OrderDirection { | |
""" | |
Specifies an ascending order for a given `orderBy` argument. | |
""" |
/** | |
* Marks all closed issues and pull reuqest notifications as read. | |
*/ | |
(() => { | |
const closedIssueNodes = document.querySelectorAll('.js-notification .type-icon-state-closed, .js-notification .type-icon-state-merged'); | |
closedIssueNodes.forEach(node => { | |
node.offsetParent.querySelector('button.delete-note').click(); | |
}); |
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import usePersistedState from './usePersistedState'; | |
function App() { | |
const [count, setCount, unsetCount] = usePersistedState( | |
0, | |
'count', | |
sessionStorage | |
); |
Standard escape codes are prefixed with Escape
:
^[
\033
\u001b
\x1b
27