Skip to content

Instantly share code, notes, and snippets.

@suienzan
suienzan / config.yaml
Last active March 31, 2024 03:36
config.yaml and Pacman hook for https://aur.archlinux.org/packages/mosdns-bin v5
log:
level: info
plugins:
# 缓存mosdns-install.hook
- tag: cache
type: cache
args:
size: 1024
lazy_cache_ttl: 86400
@nykma
nykma / README.md
Last active April 8, 2024 11:36
Clash linux iptables local redir config

Let Clash handle all local network traffic.

Setup

# Create a separate user to run Clash
useradd clash
# Note down UID
id clash
# Use rest of the file in this gist as usual.
@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active July 3, 2024 11:22
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

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 !

@AnatomicJC
AnatomicJC / zfs-docker.md
Last active December 14, 2023 00:33
ZFS and Docker

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

@kumbasar
kumbasar / imagetest.sh
Created April 25, 2019 19:29
How To Create a NTFS Image File in Linux
#!/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
@braian87b
braian87b / image-builder-openwrt-lede.sh
Last active February 20, 2024 03:01
Image-Builder Procedure for OpenWRT - LEDE
# ------------------------------------------------------------------------
# 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 ~
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active July 3, 2024 16:57 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@xjdrew
xjdrew / squid_https.md
Last active October 18, 2023 17:10
配置squid https代理

编译

通过ubuntuapt-get安装的squid没有启用ssl功能,需要手动编译。

编译squid步骤如下。

安装依赖及获取源代码

apt-get install openssl libssl-dev ssl-cert
apt-get source squid
@jwalanta
jwalanta / OpenWrt detect new device and send text message.md
Last active July 2, 2024 18:37
Detect new network devices connecting to OpenWrt and send text message
@jlgerber
jlgerber / CMakeLists.txt
Last active May 21, 2024 20:28
cmake - handling executable and library with same name
# 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 )