Solution to Rust errors of kinds:
- implementation of
Fnis not general enough (works with FnMut and FnOnce as well) - lifetime may not live long enough
use std::future::Future;
trait Callback<Arg, Res> {
type Output: Future<Output = Res>;| #!/bin/bash | |
| #set -exuo pipefail | |
| shopt -s expand_aliases | |
| function safe_function { | |
| echo "$@" | |
| echo "sf: ${BASH_LINENO[0]}" | |
| sed -n "${BASH_LINENO[0]},/^}/p" "${BASH_SOURCE[1]}" | |
| } |
Solution to Rust errors of kinds:
Fn is not general enough (works with FnMut and FnOnce as well)use std::future::Future;
trait Callback<Arg, Res> {
type Output: Future<Output = Res>;| #pragma once | |
| // #include <simlib/meta/concated_to_cstr.hh> | |
| #include <array> | |
| #include <cstddef> | |
| #include <utility> | |
| namespace meta { | |
| template <char... chars> |
| #!/bin/bash | |
| set -euo pipefail | |
| list_sinks() { | |
| pw-cli list-objects Node | grep -P '^\s+id |^\s+node\.name|^\s+media\.class = "Audio/Sink"' | grep 'media\.class' -B 2 --no-group-separator | paste -sd' \n' | sed 's/^\s*id [0-9]*, type .*node\.name = "\([^"]*\)".*/\1/' | (grep -vP "^($1)$" || true) | |
| } | |
| pactl unload-module module-combine-sink 2> /dev/null | |
| selected_names_regex='' |
| #!/bin/bash | |
| set -exuo pipefail | |
| rm -rf sim-project | |
| git init sim-project | |
| cd sim-project | |
| git commit -m 'Initial commit' --allow-empty | |
| INITIAL_COMMIT=$(git rev-parse @) |
This tutorial covers using NetworkManager with either wpa_supplicant or IWD backend. If you did not heard of IWD, it is propbable your NetworkManager uses wpa_supplicant.
UW authorization server uses DSK-NET CA certificate that is self-signed, so we need to specify it manually.
curl https://it.uw.edu.pl/pl/uslugi/UslugiInternetWiFiEduroam/dsk_net_ca.crt | sudo tee /etc/dsk_net_ca.crt| #!/bin/sh | |
| set -e | |
| cd -P -- "$(dirname -- "$0")" # chdir to script directory | |
| out_file="$HOME/backup/$(echo ${PWD#$HOME/} | sed 's@/@,@g').tar.zst" | |
| ((git ls-files -z --cached --recurse-submodules 2> /dev/null && | |
| git ls-files -z --others --exclude-standard && | |
| PROJECT_DIR=$PWD git submodule foreach --quiet 'git ls-files -z -o --exclude-standard | while read -d "" x; do echo -n "${PWD#$PROJECT_DIR/}/$x"; echo -ne "\0"; done' && |
grub using grub-install and configure it properly using grub-mkconfig -o /boot/grub/grub.cfg (for uefi it is not so easy), but before running grub-mkconfig install intel-ucode or amd-ucodenetworkmanager vim htop net-tools wireless_tools # net-tools for ifconfig, wireless_tools for iwconfig/etc/pacman.d/mirrorlistsystemctl enable --now NetworkManagernmtui to connect to internetgit man-pages procps-ng # procps-ng for pkillSinks are for output, sources are for input. To stream source to sink a loopback must be created. More shall you find there.
Our output sink will be named recording.
pacmd load-module module-null-sink sink_name=recording sink_properties=device.description=recording| // Krzysztof Małysa | |
| #include <assert.h> | |
| #include <errno.h> | |
| #include <math.h> | |
| #include <signal.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <sys/time.h> | |
| #include <sys/types.h> | |
| #include <sys/wait.h> |