Skip to content

Instantly share code, notes, and snippets.

View hsiaosiyuan0's full-sized avatar
🐝

hsiaosiyuan0

🐝
  • NetEase
  • 03:46 (UTC +08:00)
View GitHub Profile
[
{
externals: [
'next'
],
optimization: {
checkWasmTypes: false,
nodeEnv: false,
splitChunks: {
chunks: 'all',
function toAscii(i: number) {
return [i >> 24, (i & 0xff0000) >> 16, (i & 0xff00) >> 8, i & 0xff]
.map((c) => String.fromCharCode(c))
.join("");
}
type Optional<T> = { r: T; e: null } | { r: null; e: Error };
export async function deflate<T>(p: Promise<T>): Promise<Optional<T>> {
return p
@hsiaosiyuan0
hsiaosiyuan0 / hls.sh
Last active May 13, 2022 21:19
hls demo
#!/usr/bin/env bash
# downloading mv.mp4
download_mv_if_needed() {
if [ ! -f "./videos/mv.mp4" ]; then
mkdir -p ./videos
curl -L https://www.dropbox.com/s/fl02xpyhz8693b0/mv.mp\?dl\=1 -o ./videos/mv.mp4
fi
}