- Make sure you have a modern-ish version of Node.js installed.
- Type
npx https://gist.github.com/kfox/1280c2f0ee8324067dba15300e0f2fd3
- Connect to it from a client, e.g.
netcat
or similar:nc localhost 9000
After using terminals (iTerm, Terminal, Kitty) with an M1 Mac without issue for over a year, I finally came upon an issue that I couldn’t solve without using Rosetta. Rosetta is Mac software to run Intel Mac terminal commands on an M1 Mac. My issue initially came from trying to use Pyenv to install and use different versions of Python across multiple projects. After installing Rosetta, I initially used it by adding a custom flag to commands like this arch -x86_64
. This worked for me but was really error prone, “Did I forget the flag? Did I add the flag in the correct place?”.
This document describes solving M1 Mac vs Intel Mac terminal command discrepancies by creating a copy of your terminal and setting it up to run Intel Mac terminal commands using Rosetta. Although the process of making a Rosetta termi
[EDIT: I've added a part 2 to this blog post, to address some of the feedback that has come up: https://gist.github.com/getify/706e5e10822a298375da40f9cc1fa295]
Recently, this article on "The JavaScript Block Statement" came out, and it received some good discussion in a reddit thread. But the general reaction seems to be against this approach. That saddens me.
Run all of these commands at the command line (not in a Jupyter Notebook). The command line will have more informative error messages and if we need complete additional steps, we'll get the messages.
Spark is a framework within the Scala programming language. Scala uses the JVM (Java Virtual Machine) so you'll need install Java.
If you use homebrew:
The package that linked you here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
- Use ESM yourself. (preferred)
Useimport foo from 'foo'
instead ofconst foo = require('foo')
to import the package. You also need to put"type": "module"
in your package.json and more. Follow the below guide. - If the package is used in an async context, you could use
await import(…)
from CommonJS instead ofrequire(…)
. - Stay on the existing version of the package until you can move to ESM.
name: Build and Deploy | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ |
function logger(strings,...values) { | |
var str = ""; | |
for (let i = 0; i < strings.length; i++) { | |
if (i > 0) { | |
if (values[i-1] && typeof values[i-1] == "object") { | |
if (values[i-1] instanceof Error) { | |
if (values[i-1].stack) { | |
str += values[i-1].stack; | |
continue; | |
} |
This content moved here: https://exploringjs.com/impatient-js/ch_arrays.html#quickref-arrays
const needsPolyfill = !window.Intl | |
/* eslint-disable import/no-webpack-loader-syntax */ | |
const intl = require('bundle-loader?lazy&name=intl!intl') | |
/* eslint-enable import/no-webpack-loader-syntax */ | |
const polyfilled = needsPolyfill && new Promise(resolve => { | |
intl(resolve) | |
}) |