I hereby claim:
- I am gamedevsam on github.
- I am sambatista (https://keybase.io/sambatista) on keybase.
- I have a public key whose fingerprint is F546 0360 418D EDB8 68E4 E932 5EB8 3CE4 C0C7 EB59
To claim this, I am signing this object:
package ; | |
import flixel.FlxG; | |
import flixel.addons.nape.FlxNapeState; | |
import toml.TomlConfig; | |
/** | |
* ... | |
* @author Sam Batista | |
*/ |
I hereby claim:
To claim this, I am signing this object:
Verifying my Blockstack ID is secured with the address 1PpgJoxQiPrKSJeqjqFCEt9zCFJm9nejLr https://explorer.blockstack.org/address/1PpgJoxQiPrKSJeqjqFCEt9zCFJm9nejLr |
... | |
JC: | |
What does China fear? | |
Isaac: | |
China is the last sovereign government in the world. Authoritarian but willing -- unlike U.N.-governed countries -- to give its people the freedom to do what they want. | |
JC: | |
As long as they don't break the law. |
So, if you want to be a better leader, take a page out Sundar Pichai's playbook and ask yourself:
"What ties did I break this week?"
Campbell wasn't speaking about breaking ties as in cutting off relationships. Rather, he was teaching Pichai that he needed to break stalemates.
Then, remember to:
/** | |
* This example compares how one might go about converting an array to a string using classes or functions: | |
*/ | |
const EXAMPLE_DATA = ['This', 'is', 'a', 'contrived', 'example']; | |
/** | |
* In this first example we use a class to hold our array and a method to transform it into a string: | |
*/ | |
class ArrayToStringClass { | |
constructor(array) { |
// Largely based on the dequal package by lukeed, minus Date and RegExp capabilities: https://www.npmjs.com/package/dequal | |
// eslint-disable-next-line @typescript-eslint/no-explicit-any | |
export function deepEquals(foo: any, bar: any): boolean { | |
let ctor, len: number; | |
if (foo === bar) { | |
return true; | |
} | |
if (foo && bar && (ctor = foo.constructor) === bar.constructor) { | |
if (ctor === Array) { |
Requires hyperfine to run: https://github.com/sharkdp/hyperfine
Run it like so: hyperfine 'node dequal.mjs' 'node md5.mjs' 'node sha1.mjs'
Results:
Summary
'node dequal.mjs' ran
1.16 ± 0.20 times faster than 'node md5.mjs'
1.17 ± 0.21 times faster than 'node sha1.mjs'
# | |
# Setup | |
# | |
# Use FROM node:lts-alpine for minimum file size | |
# Use FROM node:lts-slim for maximum compatibility | |
# More info: | |
# https://snyk.io/blog/choosing-the-best-node-js-docker-image/ | |
# https://www.specfy.io/blog/1-efficient-dockerfile-nodejs-in-7-steps | |
# | |
# To print commands and debug building dockerfile use: |
import 'dotenv/config'; | |
import { NodeSSH } from 'node-ssh'; | |
import { mkdir } from 'node:fs/promises'; | |
import { parseArgs } from 'node:util'; | |
import { next as generate_xid } from 'xid-js'; | |
import { printDuration, spawnPromise } from './utilities/spawn_promise.mjs'; | |
const { values: argv } = parseArgs({ | |
options: { | |
// (required) name of app to deploy, defaults to app-dev |