Skip to content

Instantly share code, notes, and snippets.

@d0zingcat
d0zingcat / swiss-army knives.md
Last active December 26, 2017 14:13
swiss-army knives

Text processing

Name Usage
Pandoc Convert one markup format to another

Community

Name Usage
Launchpad A software collaboration platform that engages developer developing softwares on Ubuntu
@d0zingcat
d0zingcat / linux calendar
Created January 31, 2018 13:58
A simple unix calendar implementation in python
# -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
import os
def print_months(year, month):
if year < 1900:
@d0zingcat
d0zingcat / installChaCha20.sh
Created May 9, 2016 05:02
Install ChaCha20 Encryption for Shadowsocks On CentOS
yum install m2crypto gcc -y
wget -N --no-check-certificate https://download.libsodium.org/libsodium/releases/LATEST.tar.gz
tar zfvx libsodium-*.tar.gz
cd libsodium-*
./configure
make && make install
echo "/usr/local/lib" >> /etc/ld.so.conf
ldconfig
@d0zingcat
d0zingcat / rclone-download.sh
Last active December 18, 2020 10:40
download rclone and replace binary program with latest rclone
#!/usr/bin/env bash
set -x
rclone_zip=rclone.zip
curl -L https://downloads.rclone.org/rclone-current-linux-amd64.zip -o $rclone_zip
unzip -o $rclone_zip
dir_name=`ls -F | grep -e 'rclone.*/'`
version=`echo $dir_name | cut -d"-" -f2`
echo $dir_name, $version
name_with_version="rclone_$version"
cp "$dir_name"/rclone /usr/local/bin/$name_with_version
@d0zingcat
d0zingcat / cloudflare_dyn_dns.sh
Last active June 5, 2021 04:44 — forked from chappy84/cloudflare_dyn_dns.sh
CloudFlare Dynamic DNS Shell Script
##!/usr/bin/env sh
# Gist: https://gist.github.com/D0zingcat/8cd76dc49d28c99af010c67a4a94d30b
# forked from: https://gist.github.com/chappy84/9606755
# use environment variables instead of flags (as in docker pass parameters is not very convenient)
# a docker image is derived from this script: d0zingcat/ddns-reporter (:latest tag for amd x86-64 arch and :armv8 tag for arm x64 v8 arch, e.g. raspberry pi 4B
# you could use this image to report your dynamic public ip to cloudflare(to update your A DNS record)
# command: docker run -e KEY=${KEY} -e NAME=${subdomain} -e EMAIL=${cloudflare_email} -e ZONE={base_domain} d0zingcat/ddns-reporter:latest
# Dockerfile: https://github.com/D0zingcat/all-in-docker/blob/main/ddns-reporter/Dockerfile
# CloudFlare Dynamic DNS
#
@d0zingcat
d0zingcat / init.sh
Created February 7, 2022 07:38
bootstrap for openwrt on r2s
#!/bin/sh
set -x
install_openclash() {
opkg remove dnsmasq
opkg install dnsmasq-full
opkg install luci
opkg install luci-base
opkg install iptables opkg install coreutils
opkg install coreutils-nohup
opkg install bash
.col-lg-3.mb-4 {
width: 33%;
min-width: 33%;
}
.card {
flex-direction: row;
height: 100%;
overflow: hidden;
}
https://www.google.com.hk/search?newwindow=1&q=compile+nginx&oq=compile+nginx&gs_l=psy-ab.3...391087.392005.0.392239.7.6.0.0.0.0.288.288.2-1.1.0....0...1.1.64.psy-ab..7.0.0.LWGlKWnAerY | compile nginx - Google Search
https://www.nginx.com/resources/admin-guide/installing-nginx-open-source/ | How to Install NGINX Open Source | NGINX
https://www.digitalocean.com/community/tutorials/how-to-configure-nginx-as-a-web-server-and-reverse-proxy-for-apache-on-one-ubuntu-16-04-server | How To Configure Nginx as a Web Server and Reverse Proxy for Apache on One Ubuntu 16.04 Server | DigitalOcean
https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-16-04 | How To Set Up Nginx Server Blocks (Virtual Hosts) on Ubuntu 16.04 | DigitalOcean
https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-16-04 | How To Install Nginx on Ubuntu 16.04 | DigitalOcean
https://www.digitalocean.com/community/tutorials/how-to-configure-the-nginx-web-server-on-a-virtua
@d0zingcat
d0zingcat / personal.quanx.list
Last active March 9, 2023 07:12
My personal rules for quantumultx
# WARNING: Deprecated
# If you desire to use this file as your QuanX filter refer, plz use the following link:
# https://subconverter.d0zingcat.xyz/getruleset?type=2&url=aHR0cHM6Ly9naXN0LmdpdGh1YnVzZXJjb250ZW50LmNvbS9kMHppbmdjYXQvYTdlNDdkNjhkMmVjY2YwMzU5ZjRhZDIzYmUyNTQ3ZjgvcmF3L3Byb3h5LnBlcnNvbmFsLnN1YmNvbnZlcnRlci5saXN0&group=UHJveHk=
# The ProxyGroup name is "Proxy", and the rules were from [here](https://gist.github.com/d0zingcat/a7e47d68d2eccf0359f4ad23be2547f8) parsed by subconverter, from Clash rules to QuanX ruleset.
# Crypto
## NFTs
DOMAIN-SUFFIX,opensea.io,Crypto
DOMAIN-SUFFIX,looksrare.org,Crypto
DOMAIN-SUFFIX,gem.xyz,Crypto
@d0zingcat
d0zingcat / personal.subconverter.ini
Last active April 22, 2023 16:45
personal subconverter profile
[custom]
;不要随意改变关键字,否则会导致出错
;acl4SSR规则-在线更新版
;去广告:支持
;自动测速:支持
;微软分流:支持
;苹果分流:支持
;增强中国IP段:不支持
;增强国外GFW:不支持