Skip to content

Instantly share code, notes, and snippets.

@dishuostec
dishuostec / redis
Created December 17, 2014 05:20
redis service config file for winsw
<service>
<id>redis</id>
<name>redis</name>
<description>redis server</description>
<workingdirectory>d:\redis</workingdirectory>
<logpath>d:\redis\logs</logpath>
<logmode>rotate</logmode>
<executable>redis-server.exe</executable>
<startargument>redis.windows.conf</startargument>
<stopexecutable>taskkill.exe</stopexecutable>
@dishuostec
dishuostec / stop_hijack.bat
Last active August 29, 2015 14:09
使用windows系统防火墙拦截劫持ip
@echo off
color 1F
%windir%\system32\reg.exe query "HKU\S-1-5-19" >nul 2>&1 || (
echo -------
echo *** WARNING ***
echo -------
echo.
echo ADMINISTRATOR PRIVILEGES NOT DETECTED
echo ____________________________________________________________________________
@dishuostec
dishuostec / send_to_start_up.vbs
Created November 16, 2014 09:15
put this file in SendTo folder
if WScript.Arguments.Count = 0 then
WScript.Echo "Missing parameters"
else
strTargetPath = WScript.Arguments.item(0)
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile(strTargetPath)
strBaseName = objFSO.GetBaseName(objFile)
strTargetFolder = objFSO.GetParentFolderName(objFile)
set WshShell = WScript.CreateObject("WScript.Shell")
@dishuostec
dishuostec / shadowsocks.xml
Last active August 29, 2015 14:09
shadowsocks config for winsw
<service>
<id>shadowsocks</id>
<name>shadowsocks</name>
<description>shadowsocks</description>
<executable>node</executable>
<startargument>sslocal</startargument>
<log mode="none"/>
</service>
@dishuostec
dishuostec / aria2
Created November 4, 2014 06:29
init.d file for aria2c daemon (centos)
#!/bin/sh
#
# aria2 ariac server
#
# chkconfig: 345 70 30
# description: ariac server
# processname: aria2c
Prgmname="/usr/bin/aria2c"
shortname="aria2c"