Let Clash handle all local network traffic.
# Create a separate user to run Clash
useradd clash
# Note down UID
id clash
# Use rest of the file in this gist as usual.
log: | |
level: info | |
plugins: | |
# 缓存mosdns-install.hook | |
- tag: cache | |
type: cache | |
args: | |
size: 1024 | |
lazy_cache_ttl: 86400 |
Note: This gist may be outdated, thanks to all contributors in comments.
adb
is the Android CLI tool with which you can interact with your android device, from your PC
You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.
Don't hesitate to read comments, there is useful tips, thanks guys for this !
Create a dedicated ZFS docker pool with deduplication disabled in case of dedup enabled on your system:
zfs create -o mountpoint=/var/lib/docker -o dedup=off rpool/docker
Sometimes, you don't want ZFS for docker storage. ZFS can be sadly quite painful with Docker in Docker and similar scenarios. It might be best to avoid the problem by creating a volume in your ZFS pool, formatting that volume to ext4, and having docker use "overlay2" on top of that, instead of "zfs".
zfs create -s -V 30G rpool/docker
mkfs.ext4 /dev/zvol/rpool/docker
#!/bin/bash | |
set -x | |
image="test.img" | |
label="test" | |
mntdir=`mktemp -d` | |
sudo dd status=progress if=/dev/zero of=$image bs=6M count=1000 && sync | |
echo 'type=7' | sudo sfdisk $image |
# ------------------------------------------------------------------------ | |
# Image-Builder Procedure for OpenWRT - LEDE (In this case using Debian x64 NetInstall virtual machine) | |
# ------------------------------------------------------------------------ | |
su | |
apt-get update # Optional, make and upgrade too in case it has too many old pakackes. | |
apt-get install make aria2 screen ncftp -y | |
screen - | |
cd ~ |
*update: TBC, but this new might affect how easy it is to use this technique past August 2024: Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August
This gist, based in part on a gist by Brian Hartvigsen, allows you to export from Authy your TOTP tokens you have stored there.
Those can be "standard" 6-digits / 30 secs tokens, or Authy's own version, the 7-digits / 10 secs tokens.
dhcp-script=/etc/detect_new_device.sh
Reference:
# Lets say we want to add a library and an executable, both with the same name. | |
# In this example, it is resman | |
add_library(resman ${src_cpps} ${src_hpps} ) | |
target_link_libraries(resman ${Boost_LIBRARIES} ${LIBYAML} ${LIBFMT}) | |
# | |
# Add resman executable | |
# | |
# We call the executable resman-bin | |
add_executable(resman-bin main.cpp ) |