Suppose you're opening an issue and there's a lot noisey logs that may be useful.
Rather than wrecking readability, wrap it in a <details> tag!
<details>
Summary Goes Here| cmake_minimum_required(VERSION 3.8) | |
| project(tsProject) | |
| # Managing translations require LinguistTools module | |
| # The cmake function is defined in the Qt installation tree: | |
| # i.e. Qt5.9.1/5.9.1/gcc_64/lib/cmake/Qt5LinguistTools/Qt5LinguistToolsMacros.cmake | |
| # Reference: https://doc.qt.io/qt-5/cmake-manual.html#qt5linguisttools-macros | |
| find_package(Qt5 COMPONENTS Widgets LinguistTools) | |
| set (CMAKE_CXX_STANDARD 11) | |
| set(CMAKE_INCLUDE_CURRENT_DIR ON) |
| /* https://github.com/eisnerd/feedback-tool + github issues | |
| Example: | |
| $.feedbackGithub({ | |
| token: "16222221222128357fab95ec80b56a43c9a1868b429", | |
| issues: { | |
| repository: "tokland/feedback-test", | |
| title: "feedback from user", | |
| renderBody: (body) => "my own data\n" + body, |
| # pull the official mongo docker container | |
| docker pull mongo | |
| # create network | |
| docker network create my-mongo-cluster | |
| # create mongos | |
| docker run -d --net my-mongo-cluster -p 27017:27017 --name mongo1 mongo mongod --replSet my-mongo-set --port 27017 | |
| docker run -d --net my-mongo-cluster -p 27018:27018 --name mongo2 mongo mongod --replSet my-mongo-set --port 27018 | |
| docker run -d --net my-mongo-cluster -p 27019:27019 --name mongo3 mongo mongod --replSet my-mongo-set --port 27019 |
| user www-data; | |
| worker_processes auto; | |
| pid /run/nginx.pid; | |
| ## based on https://gist.github.com/cboettig/8643341bd3c93b62b5c2 | |
| events { | |
| worker_connections 1024; | |
| } |
| #!/bin/bash | |
| # tmux requires unrecognized OSC sequences to be wrapped with DCS tmux; | |
| # <sequence> ST, and for all ESCs in <sequence> to be replaced with ESC ESC. It | |
| # only accepts ESC backslash for ST. | |
| function print_osc() { | |
| if [[ -n $TERM ]] ; then | |
| printf "\033Ptmux;\033\033]" | |
| else | |
| printf "\033]" |
| /* | |
| * Functional Programming in JavaScript | |
| * Chapter 01 | |
| * Magical -run- function in support of Listing 1.1 | |
| * Author: Luis Atencio | |
| */ | |
| // -run- with two functions | |
| var run2 = function(f, g) { | |
| return function(x) { | |
| return f(g(x)); |
| # prompt color and format variables | |
| # A color init string consists of one or more of the following numeric codes: | |
| # * Attribute codes: | |
| # 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed | |
| # * Text color codes: | |
| # 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white | |
| # * Background color codes: | |
| # 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white | |
| # * Extended color codes for terminals that support more than 16 colors: |
替换上你的 API Token,域名ID,记录ID等参数,就可以运行了。 会在后台一直运行,每隔30秒检查一遍IP,如果修改了就更新IP。
获得 domain_id 可以用 curl
curl -k https://dnsapi.cn/Domain.List -d "login_token=TOKEN"`