Solution to Rust errors of kinds:
- implementation of
Fn
is 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>;
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.
Authentication
to Protected EAP (PEAP)
Anonymous identity
to [email protected]
Domain
to eduroam.uw.edu.pl
CA certificate
to file located at /etc/ssl/certs/Comodo_AAA_Services_root.pem
No CA certifcate is required
#!/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-ucode
networkmanager vim htop net-tools wireless_tools
# net-tools for ifconfig
, wireless_tools for iwconfig
/etc/pacman.d/mirrorlist
systemctl enable --now NetworkManager
nmtui
to connect to internetgit man-pages procps-ng
# procps-ng for pkill
Sinks 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> |
#!/bin/sh | |
# Place in file: /etc/NetworkManager/dispatcher.d/pre-up.d/wlan_auto_block.sh | |
# Make the file safe for execution: sudo chmod 744 /etc/NetworkManager/dispatcher.d/pre-up.d/wlan_auto_block.sh | |
if [ "$1" = "enp3s0" ]; then | |
rfkill block wifi # rfkill is used for unblocking, so we have to use it for blocking | |
fi |