Skip to content

Instantly share code, notes, and snippets.

View DC3's full-sized avatar

Dee Cheung DC3

View GitHub Profile
@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active November 3, 2025 12:30
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 !

@ruario
ruario / 1-README.md
Last active September 6, 2025 14:45
A script that fetches a ChromeOS image for ARM32 and extracts the Widevine binary, saving it in a compressed archive for use with Vivaldi

The included script 'widevine-flash_armhf.sh' fetches a ChromeOS image for ARM and extracts the Widevine binary, saving it in a compressed archive. Since it downloads a fairly large file (2Gb+ on disk after download) it is recommended that you run the script on a machine that has plenty of disk space.

To install the resultant archive, issue the following on your ARM machine–after copying over the archive if needed:

sudo tar Cfx / widevine-flash-20200124_armhf.tgz

(Where 'widevine-flash-20200124_armhf.tgz' is updated to reflect the actual name of the created archive)

@hermanbanken
hermanbanken / Dockerfile
Last active September 1, 2025 21:47
Compiling NGINX module as dynamic module for use in docker
FROM nginx:alpine AS builder
# nginx:alpine contains NGINX_VERSION environment variable, like so:
# ENV NGINX_VERSION 1.15.0
# Our NCHAN version
ENV NCHAN_VERSION 1.1.15
# Download sources
RUN wget "http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" -O nginx.tar.gz && \
@joeharr4
joeharr4 / ssh-cipher-benchmark.sh
Last active April 30, 2025 02:32 — forked from dlenski/ssh-cipher-benchmark.sh
Check speed of ssh cipher(s) on your system
#!/bin/bash
# ssh-cipher-benchmark.sh - Assesses speed of SSH encryption between specific hosts.
# Usage:
# ssh-cipher-benchmark.sh <remotehost> [ciphers]
# Default ciphers: all we can find...
#
# Note: In some cases, the first cipher tested runs faster than the others, regardless of order.
# Cause of this is not known, but changing the order of testing shows it to be true. Run the
# first one twice if you suspect this. Perhaps it is due to buffering?
@oprypin
oprypin / instructions.md
Last active May 8, 2025 01:05
systemd user unit + timer example

Save these files as ~/.config/systemd/user/some-service-name.*

Run this now and after any modifications: systemctl --user daemon-reload

Try out the service (oneshot): systemctl --user start some-service-name

Check logs if something is wrong: journalctl -u --user-unit some-service-name

Start the timer after this user logs in: systemctl --user enable --now some-service-name.timer

测试环境

请先安装nginx和wrk
测试完后无需清理文件,重启后不留痕迹

创建配置文件

mkdir -p /dev/shm/html;

cat > /dev/shm/nginx.conf<<'_EOF_'
user                    nobody;
@linebreaker
linebreaker / dc-metro-lines-map-animated-svg-path.markdown
Created October 12, 2017 22:18
DC Metro Lines Map (Animated SVG Path)
@janryWang
janryWang / observe.js
Created September 25, 2017 15:53
借助Proxy实现一个obseve
function observe(target, handler) {
var timer = {}
function _trigger(name, ...args) {
if (handler && typeof handler[name] === "function") {
if (!hanlder.sync) {
clearTimeout(timer[name])
timer[name] = setTimeout(function() {
handler[name](...args)
}, 17)