sudo dnf install git kernel-devel kernel-headers dkms v4l-utils
git clone https://github.com/umlaeute/v4l2loopback.git
cd v4l2loopback
make
v=$(./currentversion.sh)
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
function read_strace_file() { | |
strace --trace=file "$@" |& | |
sed --quiet 's;.*"\(/[^"]*\)".*;\1;p' | | |
sort --unique | | |
fzf --scheme=path | | |
xargs --no-run-if-empty less | |
} | |
export read_strace_file |
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
create function pg_temp.look_for_value(value text) returns | |
table(table_fullname text, column_name text) | |
language plpgsql as $$ | |
declare | |
r record; | |
found bool; | |
begin | |
for r in select * from information_schema.columns | |
loop | |
table_fullname = format('%I.%I.%I', r.table_catalog, r.table_schema, r.table_name); |
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
#!/bin/bash -xeu | |
path="/usr/local/share/ca-certificates/mitmproxy" | |
mkdir -p "$path" | |
curl -x mitmproxy:8080 mitm.it/cert/pem > "$path/mitmproxy.crt" | |
# System | |
update-ca-certificates | |
# Java |
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
#!/bin/bash | |
# | |
# Example: | |
# $ ./find-dupes-dir.sh $HOME/Documents/*/ | |
set -Eeuo pipefail | |
declare -A dirs | |
for dir in "$@" | |
do |
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
#!/bin/bash | |
# | |
# Build a container with the required command and run it | |
set -euo pipefail | |
docker_like() { | |
if command -v podman &> /dev/null | |
then | |
podman "$@" |
Did you forgot to add some rules into your .gitignore and committed some files by mistake? Here is how to fix that. Be aware that this procedure is going to overwrite the entire history of the project and your collaborators will have to clone the repository again.
Fix your .gitignore files. You can have more than one, by placing them into different folders (useful for projects using different programming languages). Use https://gitignore.io to generate good defaults.
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
#!/bin/bash | |
for unit in test_python_stop.service test_python_{start,stop}.timer | |
do | |
systemctl --user stop $unit | |
systemctl --user disable $unit | |
done | |
systemctl --user stop test_python.service | |
rm -f \ | |
~/.config/systemd/user/test_python.service \ |
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
#!/bin/sh | |
if (( $# != 1 )); then | |
>&2 echo "Usage: $0 NETWORK_INTERFACE" | |
exit 1 | |
fi | |
sudo arp-scan -gx --localnet -I $1 | | |
awk '{ | |
l="" |
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
repos: | |
- repo: local | |
hooks: | |
- id: black | |
name: black | |
entry: black | |
language: system | |
types: [python] | |
- repo: local | |
hooks: |