Skip to content

Instantly share code, notes, and snippets.

View tufei's full-sized avatar
🌴
On vacation

Ngyu-Phee Yen tufei

🌴
On vacation
View GitHub Profile
@tufei
tufei / riscv64.sh
Last active April 9, 2023 16:49
QEMU riscv64 Fedora command line
qemu-system-riscv64 -nographic -machine virt \
-cpu rv64,v=on,vlen=256,elen=64,vext_spec=v1.0 -smp 8 -m 8G \
-kernel ~/Sandbox/Fedora-Developer-Rawhide-20200108.n.0-fw_payload-uboot-qemu-virt-smode.elf \
-object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-device,rng=rng0 \
-device virtio-blk-device,drive=hd0 \
-drive file=~/Sandbox/Fedora-Developer-Rawhide-20200108.n.0-20G.raw,format=raw,id=hd0 \
-device virtio-net-device,netdev=usernet \
-netdev user,id=usernet,hostfwd=tcp::10000-:22 -bios none
@tufei
tufei / fibonacci.fs
Last active January 21, 2023 19:33
It seems to be all about stack effects...
: fibonacci 0 1 rot 1 u+do 2dup + rot drop loop nip ; \ works only for n > 0
@tufei
tufei / min.fs
Last active January 18, 2023 03:54
: min over - dup 0< and + ;
#!/bin/sh
echo "run the configure script to build VLC..."
CC=clang CXX=clang++ ./configure --libdir=/usr/local/lib --with-x --disable-medialibrary --enable-sftp --enable-libmpeg2 --enable-vpx --enable-avcodec --enable-avformat --enable-mad --enable-a52 --enable-vorbis --enable-ogg --enable-matroska --enable-freetype --enable-fribidi --enable-speex --enable-live555 --enable-skins2 --enable-alsa --enable-ncurses --disable-static --with-gnu-ld --enable-libva --enable-lirc --enable-taglib --enable-svg --enable-dc1394 --enable-theora --enable-faad --enable-twolame --enable-flac --enable-schroedinger --enable-caca --enable-jack --enable-dvdread --enable-dvdnav --disable-opencv --enable-dvbpsi --enable-vcd --enable-screen --enable-shout --enable-mod --disable-gme --disable-mpc --enable-shine --enable-omxil --enable-dxva2 --enable-dca --enable-png --enable-zvbi --enable-pulse --enable-upnp --enable-swscale --enable-v4l2 --enable-libcddb --disable-debug --enable-notify --enable-qt --enable-smbclient --enable-dsm --e
#!/bin/sh
# Reference
# https://trac.ffmpeg.org/wiki/CompilationGuide/Centos
# https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
echo "run the configure script to build FFMPEG..."
# ORT debug build
PKG_CONFIG_PATH='/opt/intel/mediasdk/lib64/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig' \