Skip to content

Instantly share code, notes, and snippets.

Buried in Codes

Tim Zhang ttimasdf

Buried in Codes
View GitHub Profile
ttimasdf /
Last active Apr 22, 2021 — forked from thomasfr/autossh.service
Systemd service for autossh


curl -sSL | \
  sudo tee /etc/default/autossh@example
curl -sSL | \
  sudo tee /etc/systemd/system/autossh@.service

sudo useradd -g nogroup -s /bin/false -m tunnel
sudo -u tunnel mkdir -p ~tunnel/.ssh  # and copy your private key here
ttimasdf / Dockerfile
Created Oct 12, 2020
花生壳内网穿透 (phddns 5.0) Docker 容器
View Dockerfile
FROM ubuntu:20.04
RUN apt-get update && apt-get install -y wget
ARG url=""
RUN wget "$url" -O phddns.deb && \
dpkg -i phddns.deb && \
rm phddns.deb
ttimasdf / patch-android.diff
Last active Aug 13, 2020
Necessary patches for building busybox for Android
View patch-android.diff
diff --git a/Makefile.flags b/Makefile.flags
index cff935ff5..e5818f5db 100644
--- a/Makefile.flags
+++ b/Makefile.flags
@@ -152,7 +152,7 @@ CRYPT_AVAILABLE := $(shell echo 'int main(void){return 0;}' >crypttest.c; $(CC)
LDLIBS += m rt crypt
-LDLIBS += m rt
+LDLIBS += m
ttimasdf /
Created Apr 2, 2020
How to build Clash dashboard inside Docker
ttimasdf / Open iterm tab here
Last active Mar 1, 2020 — forked from eric-hu/Open iterm tab here
Apple script to open an iterm2 tab from right-clicking on a file or folder in Finder.To use:(1) Open Automator(2) Create a new service(3) Change "Service receives selected" drop downs to "Files or folders" in "Finder"(4) Select "Run applescript" from the sidebar, then paste this script in and save
View Open iterm tab here
-- Adapted from these sources:
-- Modified to work with files as well, cd-ing to their container folder
on run {input, parameters}
tell application "Finder"
set my_file to first item of input
set is_folder to (do shell script "file -b " & quoted form of (POSIX path of my_file))
if is_folder ends with "directory" then
ttimasdf /
Last active Jan 30, 2020
WASU IPTV box to m3u8 file

Fetch channels from WASU IPTV box web API and generate m3u8 from return data.

ttimasdf / fix_virtualenv
Last active Sep 4, 2019 — forked from tevino/fix_virtualenv
Fix python virtualenv after python update, forked version for choice of python executable
View fix_virtualenv
#!/usr/bin/env bash
ENV_PATH="$(dirname "$(dirname "$(which pip)")")"
SYSTEM_VIRTUALENV="$(which -a virtualenv|tail -1)"
echo "Ensure the root of current virtualenv:"
echo " $ENV_PATH"
read -p "‼️ Say no if you are not sure (y/N) " -n 1 -r
PYEXC_DEF="$(sed -n '1s/^#!//p' $SYSTEM_VIRTUALENV)"
read -p "🐍 Choose which python to use? [$PYEXC_DEF] " PYEXC
ttimasdf /
Last active Jun 17, 2019
Migrate your OTA key, step by step guide


Migrate from self-built (test-key or dev-key) or Official Release from, to our self-signed builds, RETAINING DATA!!! and avoid the annoying error:

Can't install this package on top of incompatible data. Please try another package or run a factory reset


Apply the two patch accordingly, with command below. (Changed a little bit from 156047 and 162144

ttimasdf / shadowsocks-server
Created Apr 27, 2019 — forked from evianzhow/shadowsocks-server
shadowsocks-server OpenWRT init.d script
View shadowsocks-server
#!/bin/sh /etc/rc.common
# Copyright (C) 2016 Jian Chang <>
# Copyright (C) 2016 Evian Zhow <>
# This is free software, licensed under the GNU General Public License v3.
# See /LICENSE for more information.
ttimasdf /
Last active May 17, 2018
Integrate Git diffs and commits with Word DOCX files