VMWare Fusion 13 is now released. Read Vagrant and VMWare Fusion 13 Player on Apple M1 Pro for the latest.
This document summarizes notes taken while to make the VMWare Tech preview work on Apple M1 Pro, it originated
const MAX_INFLIGHT = 4; | |
const TOTAL = 100; | |
// the given dummy api supports a maximum of 4 of inflight requests. | |
// the given code is correct, but it is slow because it processes elements serially. | |
// your task is to process 100 elements as fast as possible. | |
// run this code with "node/bun test.js". | |
// it should print "pass". | |
// no external dependencies are allowed. | |
async function run(elements) { | |
// ============ |
VMWare Fusion 13 is now released. Read Vagrant and VMWare Fusion 13 Player on Apple M1 Pro for the latest.
This document summarizes notes taken while to make the VMWare Tech preview work on Apple M1 Pro, it originated
The package that linked you here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
import foo from 'foo'
instead of const foo = require('foo')
to import the package. You also need to put "type": "module"
in your package.json and more. Follow the below guide.await import(…)
from CommonJS instead of require(…)
.#!/bin/bash | |
### | |
### my-script — does one thing well | |
### | |
### Usage: | |
### my-script <input> <output> | |
### | |
### Options: | |
### <input> Input file to read. | |
### <output> Output file to write. Use '-' for stdout. |
<!doctype html> | |
<html lang="en"> | |
<body> | |
<iframe id="theIframe" width="400" height="600" sandbox="true"></iframe> | |
<script> | |
var html = '<html><h1>hello world!</h1></html>' | |
var blob = new Blob([html], {type: 'text/html'}) | |
var url = URL.createObjectURL(blob) | |
theIframe.src = url | |
</script> |
Go's "multiple return values" feature, can be used for several purposes. Among them for failure reporting to the function caller. Go has two conventions for failure reporting, but currently, no clear convention for which to use when. I've encountered different programmers that prefer different choices in different cases. In this article, we will discuss the two, and try to make the process of choosing our next function signature more conscious.
*update: TBC, but this new might affect how easy it is to use this technique past August 2024: Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August
This gist, based in part on a gist by Brian Hartvigsen, allows you to export from Authy your TOTP tokens you have stored there.
Those can be "standard" 6-digits / 30 secs tokens, or Authy's own version, the 7-digits / 10 secs tokens.
package main | |
import ( | |
"fmt" | |
"net/http" | |
"github.com/apex/go-apex" | |
"github.com/apex/go-apex/proxy" | |
) |
package main | |
import ( | |
"fmt" | |
"golang.org/x/net/route" | |
) | |
var defaultRoute = [4]byte{0, 0, 0, 0} | |
func main() { |