Skip to content

Instantly share code, notes, and snippets.

@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 / README.md
Last active April 23, 2024 17:43
每日更新IP段

#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 / 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
@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 / nodejs
Created October 5, 2015 04:09
node.js init.d script for CentOS
#!/bin/sh
#
# chkconfig: 35 99 99
# description: Node.js /home/nodejs/sample/app.js
#
. /etc/rc.d/init.d/functions
USER="nodejs"
@dishuostec
dishuostec / backup.bat
Created February 26, 2015 05:59
winscp command line backup
C:\backup\exe\WinSCP.com /privatekey=C:\backup\a.ppk [email protected] /command "synchronize local C:\backup\data\ /data/sqldump/BACKUPS/" exit
#!/bin/bash
log_dir=/usr/local/nginx/logs/
backup_log_dir=/data/nginx_logs/$(date +"%Y%m")/
log_date=$(date +"%Y%m%d")
nginx_pid=/var/run/nginx.pid
keep_days=30
echo "processing ${log_dir}"
#create backup dir
#! /bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
#===============================================================================================
# System Required: CentOS6.x (32bit/64bit)
# Description: Install Shadowsocks(libev) for CentOS
# Author: Teddysun <[email protected]>
# Intro: http://teddysun.com/357.html
#===============================================================================================
@dishuostec
dishuostec / http劫持
Created December 17, 2014 14:31
阻止中国联通的http劫持
// ==UserScript==
// @name Frame Killer
// @namespace http://www.arantius.com/
// @description 联通http劫持
// @include *
// @grant none
// ==/UserScript==
var frames=document.evaluate("//frame", document, null,
XPathResult.ANY_TYPE, null);
var f;