Skip to content

Instantly share code, notes, and snippets.

diff --git a/src/mod/applications/mod_spandsp/mod_spandsp_dsp.c b/src/mod/applications/mod_spandsp/mod_spandsp_dsp.c
index 836808a48d..ef809acc27 100644
--- a/src/mod/applications/mod_spandsp/mod_spandsp_dsp.c
+++ b/src/mod/applications/mod_spandsp/mod_spandsp_dsp.c
@@ -156,11 +156,11 @@ static int get_v18_mode(switch_core_session_t *session)
{
switch_channel_t *channel = switch_core_session_get_channel(session);
const char *var;
- int r = V18_MODE_5BIT_4545;
+ int r = V18_MODE_WEITBRECHT_5BIT_4545;
@jontow
jontow / netifbw.sh
Created March 24, 2022 21:48
Monitor network interface usage rate with minimal external tooling on linux
#!/bin/sh
# Run like so: NET_IF=ens5 UNIT=K sh netifbw.sh
NET_IF="${NET_IF:-eth0}"
SLEEP_INTERVAL="${SLEEP_INTERVAL:-1}"
UNIT="${UNIT:-B}"
MODIFIER=1
case "${UNIT}" in
B|[Bb]ytes)
MODIFIER=1
@jontow
jontow / keybase.md
Created March 8, 2022 19:49
keybase.md

Keybase proof

I hereby claim:

  • I am jontow on github.
  • I am jontow (https://keybase.io/jontow) on keybase.
  • I have a public key ASBUdLkOGYk95wGWgmco92lK0buoJPfgFA0_1lARBDePRQo

To claim this, I am signing this object:

@jontow
jontow / self-signed-cert.sh
Created October 31, 2021 15:21
generate SAN-enabled self-signed cert
#!/bin/sh
if [ -z "$2" ]; then
echo "Syntax: $0 <commonname> <subjectaltnames>"
echo ""
echo " <subjectaltname> example: 'DNS:example.com,DNS:www.example.com,IP:172.16.32.1'"
echo ""
exit 1
fi
@jontow
jontow / hw_sensors_metrics.sed
Created October 30, 2021 18:35
openbsd hw_sensors_metrics.sed
#!/usr/bin/env sed -E -f
################################################################################
#
# 2021-10-30 -- [email protected]
#
# Make heavy use of backreferences to avoid forking and translate OpenBSD sysctl(8)
# hw.sensors output into prometheus-compatible metrics
#
# Run this sed script like:
# $ sysctl hw.sensors | sed -E -f thisscript.sed
@jontow
jontow / hw_sensors_to_metrics.sh
Last active October 30, 2021 18:31
openbsd hw_sensors_to_metrics.slow
#!/bin/sh
#
# 2021-10-28 -- [email protected]
#
# Convert OpenBSD "sysctl hw.sensors" output to prometheus scrape-able metrics.
# Example:
#
# These:
# hw.sensors.nsclpcsio0.volt13=1.49 VDC (TS3)
# hw.sensors.owtemp0.temp1=17.12 degC (sn 0000078fa11b)
@jontow
jontow / tmux-sync-split.sh
Last active March 25, 2020 21:01
tmux-sync-split.sh (tss) script, spawn synchronized tmux panes with ssh or custom command
#!/bin/sh
################################################################################
#
# 2020-03-17 -- [email protected]
#
# Start a new synchronized 'N'-pane tmux session and run "$TSS_CMD $host" in
# each of the split window panes.
#
################################################################################
#
Running `rustc --crate-name tlx src/main.rs --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=6855d3808a810b73 -C extra-filename=-6855d3808a810b73 --out-dir /usr/home/jontow/GIT-tl/tlx2/target/debug/deps -L dependency=/usr/home/jontow/GIT-tl/tlx2/target/debug/deps --extern ffmpeg_sys=/usr/home/jontow/GIT-tl/tlx2/target/debug/deps/libffmpeg_sys-287c39cef2a9e2f8.rlib --extern scoped_pool=/usr/home/jontow/GIT-tl/tlx2/target/debug/deps/libscoped_pool-514a35e27912402d.rlib --extern enum_derive=/usr/home/jontow/GIT-tl/tlx2/target/debug/deps/libenum_derive-3de27a7e822f2fd9.rlib --extern syslog=/usr/home/jontow/GIT-tl/tlx2/target/debug/deps/libsyslog-bc0d3b1bbe101aa5.rlib --extern rustc_serialize=/usr/home/jontow/GIT-tl/tlx2/target/debug/deps/librustc_serialize-2c0b16b7ceb9fdcb.rlib --extern toml=/usr/home/jontow/GIT-tl/tlx2/target/debug/deps/libtoml-09bb1853192b616a.rlib --extern opencv=/usr/home/jontow/GIT-tl/tlx2/target/debug/deps/libopencv-d40822a44228eef5.rlib --extern chrono=/usr/home/jontow
^:jontow@studio:~/.cargo/git/checkouts/opencv-rust-fd92406e8846f421/4ac0211% git diff
diff --git a/build.rs b/build.rs
index ecef9c7..dd0c738 100644
--- a/build.rs
+++ b/build.rs
@@ -301,9 +301,9 @@ fn fix_lib_png(out_dir: &str) -> BuildResult<()> {
}
fn find_opencv_libs(out_dir: &str) -> BuildResult<(pkg_config::Library, PathBuf)> {
- let pkg_config_path = format!("{}:{}/dist/lib/pkgconfig",
[100%] Generating generated0.i
Scanning dependencies of target opencv_test_contrib
[100%] Building CXX object modules/contrib/CMakeFiles/opencv_test_contrib.dir/test/test_main.cpp.o
Generated 377 functions
Note: Class Feature2D has more than 1 base class (not supported by Python C extensions)
Bases: cv::FeatureDetector, cv::DescriptorExtractor
Only the first base class will be used
Scanning dependencies of target opencv_python
[100%] Building CXX object modules/python/CMakeFiles/opencv_python.dir/src2/cv2.cpp.o
[100%] Linking CXX executable ../../bin/opencv_test_contrib