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
""" | |
本脚本主要用于自动上传截图至github, 主要逻辑如下: | |
1. 每隔两秒扫描截图文件夹, 得到截图文件总数 | |
2. 与之前的截图总数对比, 如果有新的图片, 那么自动上传至github | |
3. 复制图片地址到剪贴板 | |
""" | |
import logging | |
from pathlib import Path | |
import requests | |
from urllib.parse import urlparse, urlunparse |
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
# 杀掉占用8080端口的进程 | |
fuser 8080/tcp -k | |
# 启动jetty | |
java -jar start.jar --module=requestlog,logging & |
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
# VSCode 自动安装脚本, 适用于CentOS | |
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc | |
sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo' | |
yum check-update | |
sudo yum install code |
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 | |
#title : | |
#description : | |
#author : | |
#date : | |
#usage : | |
#notes : | |
#============================================================================== |
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
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rp | |
yum install epel-release-latest-6.noarch.rpm | |
yum --disablerepo=epel -y update ca-certificates |
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
yum install -y zip unzip wget epel-release | |
curl -s "https://get.sdkman.io" | bash && source "$HOME/.sdkman/bin/sdkman-init.sh" | |
sdk install java 8.0.161-oracle | |
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
/** | |
* 百度坐标(BD09)、国测局坐标(火星坐标,GCJ02)、和WGS84坐标系之间的转换的工具 | |
* | |
* 参考 https://github.com/wandergis/coordtransform 实现的Java版本 | |
* @author geosmart | |
*/ | |
public class CoordinateTransformUtil { | |
static double x_pi = 3.14159265358979324 * 3000.0 / 180.0; | |
// π | |
static double pi = 3.1415926535897932384626; |
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
public enum PollutantCodeEnum { | |
PM10("001"), | |
SO2("002"), | |
NO2("005"), | |
CO("006"), | |
O3("007"), | |
PM25("022"), | |
Unknown(""); |
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 androidhelper import Android | |
from time import sleep | |
import json | |
import urllib2 | |
d = Android() | |
url = "youserver/sms/notify" | |
while(True): | |
messages = d.smsGetMessages(False) | |
for i in messages.result: |
OlderNewer