Install packages from Brew
brew install asdf
brew install gnupg
Create/update an asdf repo
if [ ! -d ~/.asdf ]; then
git clone https://github.com/asdf-vm/asdf.git ~/.asdf
Install packages from Brew
brew install asdf
brew install gnupg
Create/update an asdf repo
if [ ! -d ~/.asdf ]; then
git clone https://github.com/asdf-vm/asdf.git ~/.asdf
sudo yum update -y | |
# install Docker | |
# RE: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html | |
sudo amazon-linux-extras install docker | |
sudo service docker start | |
sudo usermod -a -G docker ec2-user | |
# install docker-compose | |
# RE: https://docs.docker.com/compose/install/ |
const Benchmark = require("benchmark"); | |
const Suite = new Benchmark.Suite(); | |
const numColumns = 3; | |
const arr = Array(100).map((_, i) => i); | |
const testControl = (index) => { | |
const ret = []; | |
for (let kk = 0; kk < numColumns; kk++) { | |
const item = data[index * numColumns + kk]; |
const W = (n) => `${Math.ceil(n / 500)}px`; | |
const baseBar = { | |
display: 'inline-block', | |
paddingTop: '8px', | |
paddingBottom: '8px', | |
overflow: 'hidden', | |
textOverflow: 'ellipsis', | |
fontFamily: 'Helvetica', | |
}; |
Amazon Managed Workflows for Apache Airflow (AWS MWAA) is prohibitively expensive for someone tinkering around on a personal account, and unprepared to pay a few hundred dollars a month at a minimum for their smallest environment. Here are the commands I used to get it running on Ubuntu 20.
sudo apt-get update
export const append = (demo = '', file = '') => { | |
const params = new URLSearchParams({ | |
...(file ? { file } : {}), | |
ctl: 1, | |
embed: 1, | |
}) | |
return `/${demo}?${params}` | |
} |
import { getDayOfWeek } from './dayOfWeek' | |
import test from 'node:test' | |
import assert from 'node:assert/strict' | |
describe('dayOfWeek', () => { | |
test('returns Sunday', () => { | |
assert.strictEqual(getDayOfWeek(1), ('Sunday')) | |
}) | |
test('returns Monday', () => { | |
assert.strictEqual(getDayOfWeek(2), ('Monday')) |