Skip to content

Instantly share code, notes, and snippets.

@dishuostec
dishuostec / dnsmasq
Last active March 8, 2016 12:36 — forked from billyriantono/dnsmasq.conf
/etc/init.d/vpnserver file for softether using Local Bridge
#!/bin/sh
#
# Startup script for the DNS caching server
#
# chkconfig: - 49 50
# description: This script starts your DNS caching server
# processname: dnsmasq
# pidfile: /var/run/dnsmasq.pid
# Source function library.
@dishuostec
dishuostec / ddns.sh
Last active May 1, 2019 00:25
dnspod ddns
#!/bin/sh
#################################################
# dnspod ddns v1.0
# Dynamic DNS using DNSPod API
# Fork from https://github.com/anrip/ArDNSPod
# Modified by dishuostec
#################################################
# OS Detection

#Installing and Using daemonize.sh

Installing the daemonize.sh script is quite simple. You just need to get the script and make it executable.

wget https://gist.githubusercontent.com/dishuostec/089ed42cd7db78c0e4e36bc14b73317a/raw/1932e80a0b3869c671e6d20ba2c10f6c84199225/daemonize.sh
chmod +x daemonize.sh

To use daemonize.sh just execute it like this:

@dishuostec
dishuostec / README.md
Last active April 23, 2024 17:43
每日更新IP段
@dishuostec
dishuostec / README.md
Created February 15, 2017 11:31
cross compile haproxy with static openssl and pcre for mips

cross compile haproxy for asuswrt-merlin use docker image dockcross/linux-mipsel

useage:

  1. put cross_compile.sh in current directory

  2. run

docker run -it --rm -v=$PWD:/mnt/files dockcross/linux-mipsel /bin/bash /mnt/files/cross_compile.sh

@dishuostec
dishuostec / ddns.sh
Created February 24, 2018 06:26
pure shell dnspod ddns client
#!/bin/sh
HOST=https://dnsapi.cn
USERAGENT='DNSPOD DDNS Client/1.0.0 ([email protected])'
if [ -n "$(which wget)" ];then
CMD=wget
fi
if [ -n "$(which curl)" ];then
CMD=curl
fi
@dishuostec
dishuostec / docker-compose.yml
Created June 27, 2018 01:53
xdebug on docker for windows
version: '2'
php:
image: ...
environment:
XDEBUG_CONFIG: remote_connect_back=0 remote_host=docker.for.win.localhost
PHP_IDE_CONFIG: serverName=SERVER_NAME
@dishuostec
dishuostec / gist:e1df506515a72478a3351225e6d0b915
Created July 26, 2018 09:43
docker for windows. mount docker.sock to container
set COMPOSE_CONVERT_WINDOWS_PATHS=1
@dishuostec
dishuostec / deploy_wildcards.sh
Last active December 8, 2020 19:43
synology dsm 6.2 deploy wildcard certs
#!/bin/bash
WORKING_DIR=/usr/syno/etc/certificate
ARCHIVE_DIR=${WORKING_DIR}/_archive
INFO=`cat ${ARCHIVE_DIR}/INFO`
KEYS=`echo $INFO | jq -r 'keys_unsorted|.[]'`
for key in ${KEYS}; do
SERVICES=`echo $INFO | jq -r --arg key ${key} '.[$key].services | .[] | [.subscriber, .service] | join("/")'`
@dishuostec
dishuostec / cloudflare-update-record.sh
Last active June 7, 2019 04:55 — forked from benkulbertis/cloudflare-update-record.sh
Cloudflare API v4 Dynamic DNS Update in Bash
#!/bin/bash
# CHANGE THESE
auth_email="[email protected]"
auth_key="c2547eb745079dac9320b638f5e225cf483cc5cfdda41" # found in cloudflare account settings
zone_name="example.com"
record_name="www.example.com"
# MAYBE CHANGE THESE
ip=$(curl -s http://ipv4.icanhazip.com)