This sheet goes along with this SSH YouTube tutorial
$ ssh brad@192.168.1.29
$ mkdir test
$ cd test
<?php | |
// Proxy script for Shoutcast audio streams. | |
// Overcomes the CORS issue when using JavaScript to fetch streams for playback and analysis. | |
// Also http > https | |
/* | |
// .htaccess file | |
// eg: index.php and .htaccess in /radio on your host. | |
// Point JS/fetch to https://yourhost/radio/audio.mp3 (or any made-up .mp3 name) |
$ ssh brad@192.168.1.29
$ mkdir test
$ cd test
docker run \ | |
--name {{printf "%q" .Name}} \ | |
{{- with .HostConfig}} | |
{{- if .Privileged}} | |
--privileged \ | |
{{- end}} | |
{{- if .AutoRemove}} | |
--rm \ | |
{{- end}} | |
{{- if .Runtime}} |
Picking the right architecture = Picking the right battles + Managing trade-offs
Photo by Ricardo Gomez Angel on Unsplash
This gist is a collection of common patterns I've personally used here and there with Custom Elements.
These patterns are all basic suggestions that could be improved, enriched, readapted, accordingly with your needs.
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(…)
.#include <intrin.h> // __rdtsc | |
#include <stdio.h> | |
typedef unsigned int uint; | |
typedef unsigned short uint16; | |
typedef unsigned long long uint64; | |
// ISPC functions: | |
extern "C" void half_to_float_test(const uint16 * vin, float * vout, int count); | |
extern "C" void half_to_float_test_fast(const uint16 * vin, float * vout, int count); |
import { useState, useEffect, useRef, useMemo } from 'react' | |
export default function Wordle() { | |
let [currentAttempt, setCurrentAttempt] = useState('') | |
let [bestColors, setBestColors] = useState(() => new Map()) | |
let [history, setHistory] = usePersistedHistory(h => { | |
waitForAnimation(h) | |
}) | |
useEffect(() => { |