node auditResolutions.js
This will print some output that looks like this –
{"css-select@npm:2.1.0/nth-check":">=2.0.1"}
<html> | |
<body> | |
<form action="/upload" enctype="multipart/form-data" method="post"> | |
<input type="text" name="title"> | |
<input type="file" name="file"> | |
<input type="submit" value="Upload"> | |
</form> | |
</body> | |
</html> |
{ | |
"version": "0.1.0", | |
// List of configurations. Add new configurations or edit existing ones. | |
// ONLY "node" and "mono" are supported, change "type" to switch. | |
"configurations": [ | |
{ | |
// Name of configuration; appears in the launch configuration drop down menu. | |
"name": "Run app.js", | |
// Type of configuration. Possible values: "node", "mono". | |
"type": "node", |
// 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'); | |
} | |
}; |
package me | |
import java.io.{File, FileInputStream} | |
import org.apache.pdfbox.pdmodel.PDDocument | |
import org.apache.pdfbox.tools.PDFText2HTML | |
object PDFtoHTML { | |
def main(args: Array[String]): Unit = { | |
val stream = new FileInputStream(new File("/Users/me/Downloads/example.pdf")) |
const {extend: gotExtend} = require('got'); | |
const http2 = require('http2-wrapper'); | |
const resolveALPN = require('resolve-alpn'); | |
// Taken from https://github.com/nodejs/node/blob/d4c91f28148af8a6c1a95392e5c88cb93d4b61c6/lib/_http_agent.js | |
// | |
// throws | |
// tls.connect({host: 'httpbin.org', port: 443}); | |
// | |
// doesn't throw |
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
.