替换上你的 API Token,域名ID,记录ID等参数,就可以运行了。 会在后台一直运行,每隔30秒检查一遍IP,如果修改了就更新IP。
获得 domain_id 可以用 curl
curl -k https://dnsapi.cn/Domain.List -d "login_token=TOKEN"`
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: supervisord | |
# Required-Start: $remote_fs | |
# Required-Stop: $remote_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Example initscript | |
# Description: This file should be used to construct scripts to be | |
# placed in /etc/init.d. |
#!/bin/bash | |
# | |
# Generate a random MAC address with a known vendor prefix from the nmap mac | |
# prefixes file. | |
# | |
# Tim van Werkoven, 20100405 <[email protected]> | |
# This file is licensed under the Creative Commons Attribution-Share Alike | |
# license versions 3.0 or higher, see | |
# http://creativecommons.org/licenses/by-sa/3.0/ |
# -*- coding:utf-8 -*- | |
import re | |
import urllib2 | |
from lib.BeautifulSoup import BeautifulSoup | |
agent="""Sosospider+(+http://help.soso.com/webspider.htm)""" | |
blog_url = 'http://blog.sina.com.cn/s/articlelist_1517582220_0_1.html' | |
spider_handle = urllib2.urlopen(blog_url) | |
blog_content = spider_handle.read() |
# assume the following directory structure where contents of doc/ | |
# and source/ are already checked into repo., with the exception | |
# of the _build directory (i,e. you can check in _themes or _sources | |
# or whatever else). | |
# | |
# proj/ | |
# source/ | |
# doc/ | |
# remove doc/_build/html if present |
替换上你的 API Token,域名ID,记录ID等参数,就可以运行了。 会在后台一直运行,每隔30秒检查一遍IP,如果修改了就更新IP。
获得 domain_id 可以用 curl
curl -k https://dnsapi.cn/Domain.List -d "login_token=TOKEN"`
sudo aptitude -y install nginx | |
cd /etc/nginx/sites-available | |
sudo rm default | |
sudo cat > jenkins | |
upstream app_server { | |
server 127.0.0.1:8080 fail_timeout=0; | |
} | |
server { | |
listen 80; |
update-rc.d logstash-shipper defaults | |
update-rc.d logstash-reader defaults |
from geventwebsocket.handler import WebSocketHandler | |
from gevent.pywsgi import WSGIServer | |
from flask import Flask, request, render_template | |
app = Flask(__name__) | |
@app.route('/') | |
def index(): | |
return render_template('index.html') |