Skip to content

Instantly share code, notes, and snippets.

View wsgzao's full-sized avatar
:octocat:
对方正在输入...

王奥(OX) wsgzao

:octocat:
对方正在输入...
View GitHub Profile
@wsgzao
wsgzao / gist:961388689507df9ea2b2f728b343dea4
Last active May 3, 2022 10:52
使用宏自动将Excel中的数据发送到PPT中
Sub 自动将Excel中的数据发送到PPT中()
'1、declare variables
Dim rng As Excel.Range
Dim pp As PowerPoint.Application
Dim pppres As PowerPoint.Presentation
Dim ppslide As PowerPoint.Slide
'2、Open PowerPoint and create new presentation
@wsgzao
wsgzao / py3strlist.py
Last active November 12, 2021 10:08
py3strlist.py
'''
Input:
192.168.0.1
192.168.0.2
192.168.0.3
Output:
['192.168.0.1','192.168.0.2','192.168.0.3']
'''
@wsgzao
wsgzao / py3list.py
Last active November 12, 2021 10:07
read a text file into a string variable and strip newlines
'''
Input:
192.168.0.1
192.168.0.2
192.168.0.3
Output:
192.168.0.1,192.168.0.2,192.168.0.3,
'''
@wsgzao
wsgzao / GetRealPath.sh
Created October 25, 2019 10:57
Get symlink real path and copy nginx site-enabled files to new place
#!/bin/bash
dir_new="/tmp/wangao/*/sites-enabled/"
for link in $(find ./ -type l)
do
echo
echo "Link is:"
echo $link
realpath=$(readlink -f $link)
echo $dir
@wsgzao
wsgzao / rps.sh
Last active August 15, 2023 02:42
rps.sh
#!/bin/bash
# chkconfig: 2345 90 60
### BEGIN INIT INFO
# Provides: rps
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: enable rps config for ubuntu
# Description: enabele rps which is a kernel tweak for network performance
@wsgzao
wsgzao / zabbix.md
Last active July 27, 2018 05:50
zabbix.md
@wsgzao
wsgzao / pip_windows.py
Last active April 26, 2017 03:31
pip_windows
import os
ini="""[global]
index-url = https://pypi.doubanio.com/simple/
[install]
trusted-host=pypi.doubanio.com
"""
pippath=os.environ["USERPROFILE"]+"\\pip\\"
if not os.path.exists(pippath):
@wsgzao
wsgzao / kuaipan_auto_login.py
Created August 18, 2014 09:02
金山快盘领取每日的登录奖励
# -*- coding: utf-8 -*-
#python 2.7
import urllib2,urllib,cookielib,json
username = "" ###账号###
password = "" ###密码###
class sign(object):
username = ''
password = ''
#登录显示页面
@wsgzao
wsgzao / v2ex_auto_login.py
Last active August 29, 2015 14:05
v2ex领取每日的登录奖励
# -*- coding: utf-8 -*-
#python 2.7
#beautifulsoup4-4.3.2
#requests-2.3.0
#python setup.py install
from bs4 import BeautifulSoup
import requests
username = '' ###账号###