Skip to content

Instantly share code, notes, and snippets.

Avatar
🧑‍💼
Buried in Codes

Tim Zhang ttimasdf

🧑‍💼
Buried in Codes
View GitHub Profile
@ttimasdf
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="https://dl-cdn.oray.com/hsk/linux/phddns-5.0.0-amd64.deb"
RUN wget "$url" -O phddns.deb && \
dpkg -i phddns.deb && \
rm phddns.deb
@ttimasdf
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)
ifeq ($(CRYPT_AVAILABLE),y)
LDLIBS += m rt crypt
else
-LDLIBS += m rt
+LDLIBS += m
@ttimasdf
ttimasdf / Build-clash-dashboard.md
Created Apr 2, 2020
How to build Clash dashboard inside Docker
View Build-clash-dashboard.md
@ttimasdf
ttimasdf / IPTV_API_to_m3u8.md
Last active Jan 30, 2020
WASU IPTV box to m3u8 file
View IPTV_API_to_m3u8.md

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

@ttimasdf
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 <aa65535@live.com>
# Copyright (C) 2016 Evian Zhow <evianzhow@gmail.com>
#
# This is free software, licensed under the GNU General Public License v3.
# See /LICENSE for more information.
#
START=90
@ttimasdf
ttimasdf / 00-Systemd_service_for_autossh.md
Last active Oct 21, 2020 — forked from thomasfr/autossh.service
Systemd service for autossh
View 00-Systemd_service_for_autossh.md

Usage

curl -sSL https://gist.githubusercontent.com/ttimasdf/ef739670ac5d627981c5695adf4c8f98/raw/autossh@host1 | \
  sudo tee /etc/default/autossh@example
curl -sSL https://gist.githubusercontent.com/ttimasdf/ef739670ac5d627981c5695adf4c8f98/raw/autossh@.service | \
  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
ttimasdf / README.md
Last active May 17, 2018
Integrate Git diffs and commits with Word DOCX files
View README.md
View LICENSE KEY FOR SUBLIME TEXT 3 BUILD 3143.md

STEPS

  • Click on Help menu

  • Select Enter License

  • Then paste given KEY given at bottom

  • Finally click on Use License

@ttimasdf
ttimasdf / cve.patch
Last active Dec 18, 2017
My cve-search patch
View cve.patch
diff --git a/sbin/db_mgmt_cpe_dictionary.py b/sbin/db_mgmt_cpe_dictionary.py
index 4c904cf..37cd9c8 100755
--- a/sbin/db_mgmt_cpe_dictionary.py
+++ b/sbin/db_mgmt_cpe_dictionary.py
@@ -31,6 +31,7 @@ from lib.ProgressBar import progressbar
from lib.Toolkit import toStringFormattedCPE
from lib.Config import Configuration
import lib.DatabaseLayer as db
+from time import time
@ttimasdf
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
echo
PYEXC_DEF="$(sed -n '1s/^#!//p' $SYSTEM_VIRTUALENV)"
read -p "🐍 Choose which python to use? [$PYEXC_DEF] " PYEXC
You can’t perform that action at this time.