You have installed GPG, then tried to commit and suddenly you see this error message after it:
error: gpg failed to sign the data
fatal: failed to write commit object
Debug
// This is just https://bottosson.github.io/posts/gamutclipping/ crudely translated to TS | |
type Lab = { L: number; a: number; b: number }; | |
type RGB = { r: number; g: number; b: number }; | |
type sRGB = { r: number; g: number; b: number }; | |
function linear_srgb_to_oklab(c: RGB): Lab { | |
const l = 0.4122214708 * c.r + 0.5363325363 * c.g + 0.0514459929 * c.b; | |
const m = 0.2119034982 * c.r + 0.6806995451 * c.g + 0.1073969566 * c.b; | |
const s = 0.0883024619 * c.r + 0.2817188376 * c.g + 0.6299787005 * c.b; |
/* Ultra lightweight Github REST Client */ | |
// original inspiration via https://gist.github.com/v1vendi/75d5e5dad7a2d1ef3fcb48234e4528cb | |
const token = 'github-token-here' | |
const githubClient = generateAPI('https://api.github.com', { | |
headers: { | |
'User-Agent': 'xyz', | |
'Authorization': `bearer ${token}` | |
} | |
}) |
#!/bin/bash | |
username="COGNITO_USER_NAME" | |
password="PASSWORD" | |
clientid="APP_CLIENT_ID" | |
region="eu-west-1" | |
aws_profile="AWS_CLI_PROFILE" | |
response_json="" | |
json_field='IdToken' |
declare module 'react-joyride' { | |
import * as React from "react"; | |
export default class Joyride extends React.Component<Props, State> { | |
constructor(props: Props); | |
reset(restart?: boolean): void; | |
next(): void; | |
back(): void; | |
addTooltip(data: Step): void; |
// Component.js | |
const Component = props => ( | |
<MyContext.Consumer> | |
{(context) => ( | |
<Foo | |
bar={props.bar} | |
baz={context.baz} | |
/> | |
)} | |
</MyContext.Consumer> |
This content moved here: https://exploringjs.com/impatient-js/ch_arrays.html#quickref-arrays
import produce from 'immer'; | |
import {createStore} from 'redux'; | |
const handleActions = (actionsMap, defaultState) => ( | |
state = defaultState, | |
{type, payload} | |
) => | |
produce(state, draft => { | |
const action = actionsMap[type]; | |
action && action(draft, payload); |
import React from 'react'; | |
const ConditionalWrap = ({condition, wrap, children}) => condition ? wrap(children) : children; | |
const Header = ({shouldLinkToHome}) => ( | |
<div> | |
<ConditionalWrap | |
condition={shouldLinkToHome} | |
wrap={children => <a href="/">{children}</a>} | |
> |
This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x
The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/