Skip to content

Instantly share code, notes, and snippets.

View ttimasdf's full-sized avatar

Known Rabbit ttimasdf

View GitHub Profile
@ttimasdf
ttimasdf / _README.md
Last active July 23, 2022 08:34
Hexo to Hugo Article & Images migrator

Hexo to Hugo Migrator

Usage:

  1. cd to Hexo source/ directory. copy migrator.py here.
  2. If you have image host CDN mapped to local directory, change LOCAL_CDN_DOMAIN and p_imgcdn accordingly
  3. run ./migrator.py, pip package requests is the only dependency.
  4. check output in _export/
# The following is adapted from https://github.com/reswitched/loaders/blob/master/nxo64.py
#
# ===========================================================================================
#
# Copyright 2017 Reswitched Team
#
# Permission to use, copy, modify, and/or distribute this software for any purpose with or
# without fee is hereby granted, provided that the above copyright notice and this permission
# notice appear in all copies.
#
@ttimasdf
ttimasdf / Dockerfile
Created October 12, 2020 11:10
花生壳内网穿透 (phddns 5.0) Docker 容器
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 August 13, 2020 10:55
Necessary patches for building busybox for Android
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 April 2, 2020 06:01
How to build Clash dashboard inside Docker
@ttimasdf
ttimasdf / IPTV_API_to_m3u8.md
Last active January 30, 2020 13:04
WASU IPTV box to m3u8 file

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

@ttimasdf
ttimasdf / shadowsocks-server
Created April 27, 2019 14:21 — forked from evianzhow/shadowsocks-server
shadowsocks-server OpenWRT init.d script
#!/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 January 1, 2024 21:57 — forked from thomasfr/autossh.service
Systemd service for autossh

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 January 10, 2024 15:36
Integrate Git diffs and commits with Word DOCX files

STEPS

  • Click on Help menu

  • Select Enter License

  • Then paste given KEY given at bottom

  • Finally click on Use License