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 | |
| [ $# -ne 1 ] && echo "Usage: $0 name" && exit 1 | |
| p=$(printf "%d" "0x$(printf "%s" "$1" | md5sum | head -c 4)") | |
| # pratical port range is 1024 ~ 65535 (for app that don't require root) | |
| # 64499 is the first prime number that less than 65535 - 1024 | |
| port=$((p % 64499 + 1024)) | |
| echo "$port" |
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
| <script> | |
| if (typeof Promise == "undefined") { | |
| document.write('<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/polyfill.min.js"><\/script>'); | |
| } | |
| if (window.URL && window.URL.prototype && ('href' in window.URL.prototype)) { | |
| } else { | |
| document.write('<script src="https://cdn.jsdelivr.net/gh/arv/DOM-URL-Polyfill@e54d67f/src/url.min.js"><\/script>'); | |
| } | |
| if (typeof URLSearchParams == "undefined") { | |
| document.write('<script src="https://cdn.jsdelivr.net/npm/@ungap/[email protected]/min.js"><\/script>'); |
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
| /** | |
| * Arbitrary-length tuples | |
| * ======================= | |
| * | |
| * Working with tuples of unknown length in TypeScript is a pain. Most library authors fall back on enumerating all possible | |
| * tuple lengths up to a threshold (see an example here https://github.com/pelotom/runtypes/blob/fe19290d375c8818d2c52243ddc2911c8369db37/src/types/tuple.ts ) | |
| * | |
| * In this gist, I'm attempting to leverage recursion to provide support for arbitrary length tuples. This has the potential | |
| * to make some kinds of declarative APIs nicer and enhance type inference in some cases. | |
| * This example shows how to take a variable-length tuple as an input, transform each of its types and use the resulting |
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
| ffprobe version 7.1-full_build-www.gyan.dev Copyright (c) 2007-2024 the FFmpeg developers | |
| built with gcc 14.2.0 (Rev1, Built by MSYS2 project) | |
| configuration: --enable-gpl --enable-version3 --enable-shared --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libopenjpeg --enable-libquirc --enable-libuavs3d --enable-libxevd --enable-libzvbi --enable-libqrencode --enable-librav1e --enable-libsvtav1 --enable-libvvenc --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi |
OlderNewer