node auditResolutions.js
This will print some output that looks like this –
{"css-select@npm:2.1.0/nth-check":">=2.0.1"}
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import argparse | |
from os import environ | |
from json import load, loads, dumps | |
from urlparse import urlparse | |
try: | |
from urllib.request import urlopen, Request | |
from urllib.error import HTTPError |
GRPC_VERBOSITY=DEBUG GRPC_TRACE=all yarn run debug | |
yarn run v1.17.3 | |
$ ts-node src/debug.ts | |
D0908 08:17:51.870543000 4400821696 dns_resolver.cc:294] Using native dns resolver | |
I0908 08:17:51.870996000 4400821696 timer_manager.cc:85] Spawn timer thread | |
I0908 08:17:51.871014000 4400821696 init.cc:163] grpc_init(void) | |
I0908 08:17:51.871060000 123145562341376 timer_manager.cc:246] timers not checked: expect another thread to | |
I0908 08:17:51.871069000 123145562341376 timer_manager.cc:194] sleep until kicked | |
I0908 08:17:51.871329000 4400821696 completion_queue.cc:504] grpc_completion_queue_create_internal(completion_type=0, polling_type=0) |
import { forwardRef } from 'react'; | |
import Select from 'react-select'; | |
import { Controller } from 'react-hook-form'; | |
import type { RefObject } from 'react'; | |
import type { Props as ReactSelectProps } from 'react-select'; | |
const Select = forwardRef( | |
(props: SelectProps, ref: RefObject<HTMLSelectElement>) => { | |
return ( | |
<Controller |
// Your main component. | |
const MyComponentWrapper = (props) => { | |
// Watch changes to local storage, and if we logout in 1 tab, | |
// logout in every other tab. | |
const syncLogout = (event: StorageEvent): void => { | |
if (event.key === 'logout') { | |
Router.push('/login'); | |
} | |
}; |
import { createReadStream } from 'fs'; | |
import { NODE_STREAM_INPUT, parse } from 'papaparse'; | |
(async () => { | |
const csvStream = createReadStream('machine-readable-business-employment-data-mar-2023-quarter.csv'); | |
const parseStream = parse(NODE_STREAM_INPUT); | |
csvStream.pipe(parseStream); | |
const data: Array<Array<string>> = []; | |
parseStream.on('data', (chunk: Array<string>) => { | |
data.push(chunk); |
#DEBUG | |
git notes --ref semantic-release list | |
# REFER: https://github.com/semantic-release/semantic-release/blob/master/docs/support/troubleshooting.md#release-not-found-release-branch-after-git-push---force | |
git tag --delete v4.0.0 | |
git push --delete origin v4.0.0 | |
git tag v4.0.0 cdbb31e9cece505753becbfccc7ab64665a4cca5 # Commit that created the release | |
git notes --ref semantic-release add -f -m '{"channels":[null]}' v4.0.0 | |
git push --force origin refs/notes/semantic-release |
FROM golang:alpine AS builder | |
# Install git. | |
# Git is required for fetching the dependencies. | |
RUN apk update && apk add --no-cache git | |
WORKDIR $GOPATH/src/vserver/ | |
COPY . . | |
# Fetch dependencies. | |
# Using go get. | |
RUN go get -d -v |
Updates to implementation details based on today's call –
On an update call, make the client send a "snapshot" of the current record, along with the incoming UPDATE
payload and save these to cache. Let's call this v1
.
Generate the UPDATE query, execute it, and return the updated payload as usual, along with a unique undo_id
. Additionally, save these to cache as well. Let's call this v2
.
Now if the API consumer needs an undo, they need to send the undo_id
, with which we should be able to look up both the v1
record, the v2
record, do a diff and execute a new UPDATE
query that rolls back v2
to v1
.