- use the script ssr, and get free ssr server or create a server by youself.
- follow the annotation in script, set the server configuration.
ssr config- install polipo.
| /* Utilities */ | |
| var RANDOM = function() {}; | |
| function _randomInt(min, max) { | |
| return Math.floor(Math.random() * (max - min + 1)) + min; | |
| } | |
| function _randomHex(len) { | |
| var hex = '0123456789abcdef'; |
| FROM nginx:alpine AS builder | |
| # nginx:alpine contains NGINX_VERSION environment variable, like so: | |
| # ENV NGINX_VERSION 1.15.0 | |
| # Our NCHAN version | |
| ENV NCHAN_VERSION 1.1.15 | |
| # Download sources | |
| RUN wget "http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" -O nginx.tar.gz && \ |
| import asyncio | |
| import aiohttp | |
| import aiosocks | |
| from aiosocks.connector import ProxyConnector, ProxyClientRequest | |
| async def main(): | |
| async with aiohttp.ClientSession() as session: | |
| async with session.get('http://icanhazip.com/') as resp: |
ssr config| -- a quick LUA access script for nginx to check IP addresses match an | |
| -- `ip_whitelist` set in Redis, and if no match is found send a HTTP | |
| -- 403 response or just a custom json instead. | |
| -- | |
| -- allows for a common whitelist to be shared between a bunch of nginx | |
| -- web servers using a remote redis instance. lookups are cached for a | |
| -- configurable period of time. | |
| -- | |
| -- white an ip: | |
| -- redis-cli SADD ip_whitelist 10.1.1.1 |
Using the REST API to upload a file to WordPress is
quite simple. All you need is to send the file in a
POST-Request to the wp/v2/media route.
There are two ways of sending a file. The first method simply sends the file in the body of the request. The following PHP script shows the basic principle:
| {"lastUpload":"2020-04-30T04:17:22.471Z","extensionVersion":"v3.4.3"} |
| import java.util.ArrayList; | |
| import java.util.List; | |
| import us.codecraft.webmagic.Page; | |
| import us.codecraft.webmagic.Site; | |
| import us.codecraft.webmagic.Spider; | |
| import us.codecraft.webmagic.processor.PageProcessor; | |
| /** | |
| * 爬取http://www.tianyisw.com/ 政策法规数据 |
| #!/bin/bash | |
| if [ $# -eq 0 ]; then | |
| echo "Usage: ./pushover <message> [title]" | |
| exit | |
| fi | |
| MESSAGE=$1 | |
| TITLE=$2 |