This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Which iteration in the fastest? | |
// each number is in range [0 .. 255] | |
import { bench, run } from 'mitata'; | |
var arr1 = []; // array of { rand: number } objects | |
var arr2 = []; // array of numbers | |
var arr3 = []; // array of numbers, iterated with forEach | |
var arr4 = []; // array of numbers packed into 4-byte integers |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
BASE_PIPER_VOICES_URL=${BASE_PIPER_VOICES_URL:-https://huggingface.co/rhasspy/piper-voices/resolve/main} | |
INSTALL_DIR=${INSTALL_DIR:-~/.local/share/speech-dispatcher-piper} | |
CONFIG_DIR=${CONFIG_DIR:-~/.config/speech-dispatcher/modules} | |
CONFIG_PATH=$CONFIG_DIR/piper-generic.conf | |
PLATFORM=${PLATFORM:-$(uname -m)} | |
PIPER_BIN_GZ_URL=${PIPER_BIN_GZ_URL:-https://github.com/rhasspy/piper/releases/latest/download/piper_linux_$PLATFORM.tar.gz} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/plymouth/plymouthd.conf | |
[Daemon] | |
DeviceScale=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createContext } from 'react'; | |
import { ServerStyleSheet } from 'styled-components'; | |
export default createContext<{ | |
styles: React.ReactNode[]; | |
renderMode: 'head' | 'body' | 'all'; | |
}>({ styles: [], renderMode: 'all' }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo "=== Set local registry ===" | |
npm set registry http://localhost:4873/ | |
trap : INT | |
sinopia | |
echo "=== Rollback to default registry ===" | |
npm set registry https://registry.npmjs.org/ |