This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
http://msdn.microsoft.com/en-us/library/windows/desktop/aa383607(v=vs.85).aspx | |
""" | |
import win32com.client | |
scheduler = win32com.client.Dispatch("Schedule.Service") | |
# list user task only | |
# scheduler.Connect() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@do:~# iptables -nvL --line-numbers | |
Chain INPUT (policy ACCEPT 0 packets, 0 bytes) | |
num pkts bytes target prot opt in out source destination | |
1 270 39545 ACCEPT all -- lo * 127.0.0.0/8 127.0.0.0/8 | |
2 0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 | |
3 8055 3839K ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED | |
4 3 132 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 | |
5 0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 | |
6 0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:443 | |
7 161 7052 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:23 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 新建一个无密码,无法登陆,没home的系统用户,就叫shadowsocks | |
adduser --system --disabled-password --disabled-login --no-create-home shadowsocks | |
# 修改 /etc/default/shadowsocks-libev | |
USER=shadowsocks | |
GROUP=nogroup | |
# 使用setcap,允许非root用户无法监听低位端口 | |
apt-get install libcap2-bin | |
setcap 'cap_net_bind_service=+ep' /usr/bin/ss-server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http_port 127.0.0.1:3128 transparent | |
acl localhost src 127.0.0.1 | |
acl thisvps src >>VPSIP<< | |
http_access allow localhost | |
http_access allow thisvps | |
http_access deny all | |
cache_mem 128 MB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from ctypes import * | |
from ctypes.wintypes import * | |
INVALID_HANDLE_VALUE = -1 | |
CREATE_UNICODE_ENVIRONMENT = 0x00000400 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[/Script/Engine.RendererSettings] | |
grass.DiscardDataOnLoad=1 | |
r.DefaultFeature.Bloom=False | |
r.ReflectionEnvironment=0 | |
r.DefaultFeature.AmbientOcclusion=False | |
r.DefaultFeature.AmbientOcclusionStaticFraction=False | |
r.DefaultFeature.AutoExposure=False | |
r.DefaultFeature.MotionBlur=0 | |
r.DefaultFeature.LensFlare=0 | |
r.AmbientOcclusionLevels=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for obj in objWMI: | |
if obj.Active != None: | |
print("Active:" + str(obj.Active)) | |
if obj.InstanceName != None: | |
print("InstanceName:" + str(obj.InstanceName)) | |
if obj.ManufacturerName != None: | |
print("ManufacturerName:" + str(obj.ManufacturerName)) | |
if obj.ProductCodeID != None: | |
print("ProductCodeID:" + str(obj.ProductCodeID)) | |
if obj.SerialNumberID != None: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# The purpose of the script is to reinstall the operating system (debrick) on | |
# a harddrive that has been extracted from the housing of a WD MyBook Live. | |
# | |
#help screen | |
if [ $# = 1 -a "$1" = "--help" ]; then | |
echo " | |
standard use of script is: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:latest | |
ENV TZ=Asia/Shanghai | |
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories | |
RUN echo "@testing https://mirrors.tuna.tsinghua.edu.cn/alpine/edge/testing" >> /etc/apk/repositories | |
RUN apk update | |
RUN apk add bash python3 py3-pip py3-astral@testing py3-tz@testing py3-netifaces@testing | |
RUN ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime |