This file contains 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
#!/usr/bin/sed -rf | |
# Unmangle Rust symbols | |
# See https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/commit/?id=cae15db74999edb96dd9f5bbd4d55849391dd92b | |
# Example, with [FlameGraph](https://github.com/brendangregg/FlameGraph): | |
# perf record -g target/debug/bin | |
# perf script | stackcollapse-perf | rust-unmangle | flamegraph > perf.svg | |
# Remove hash and address offset | |
s/::h[0-9a-f]{16}//g | |
s/\+0x[0-9a-f]+//g |
This file contains 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
thread 'main' panicked at 'oh no!', t.rs:3 | |
stack backtrace: | |
0: 0x56475d4a5b58 - std::sys::imp::backtrace::tracing::imp::unwind_backtrace::hf65740f571b3b062 | |
at /home/yamakaky/dev/rust/rust/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49 | |
1: 0x56475d4d586e - std::sys_common::backtrace::_print::h49fe0d471b73c20e | |
at /home/yamakaky/dev/rust/rust/src/libstd/sys_common/backtrace.rs:71 | |
2: 0x56475d4d4a7e - std::sys_common::backtrace::print::hd65a646efeb9e475 | |
at /home/yamakaky/dev/rust/rust/src/libstd/sys_common/backtrace.rs:60 | |
3: 0x56475d4a85ae - std::panicking::default_hook::{{closure}}::h25191b25fd3a12b5 | |
at /home/yamakaky/dev/rust/rust/src/libstd/panicking.rs:355 |
This file contains 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
#!/usr/bin/env bash | |
set -euo pipefail | |
IFS=$'\n\t' | |
set +e | |
ffmpeg -version > /dev/null 2>&1 | |
if [[ $? -ne 0 ]]; then | |
echo "ffmpeg must be installed" | |
exit 1 | |
fi |
This file contains 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
from ocaml/opam2:alpine-3.9 as builder | |
copy deps deps | |
run sed -i '/#/d' deps | |
run wget http://downloads.sourceforge.net/liblo/liblo-0.30.tar.gz | |
run tar xf liblo* | |
run cd liblo-0.30 && ./configure && make && sudo make install | |
run opam depext $(cat deps) |
This file contains 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
sb_available = ref [0, 1, 2, 3] | |
def sb_name(idx) | |
"soundboard#{idx}" | |
end | |
def mk_sb_track(idx) | |
def on_e(_, _) | |
log.debug(label = "soundboard", "Reusing id #{idx}") | |
sb_available := list.add(idx, !sb_available) | |
end |
This file contains 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
from ocaml/opam2:alpine-3.10 as builder | |
copy deps deps | |
run sed -i '/#/d' deps | |
run wget http://downloads.sourceforge.net/liblo/liblo-0.30.tar.gz && \ | |
tar xf liblo* && \ | |
cd liblo-0.30 && \ | |
./configure && \ | |
make && \ |