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
GNU AFFERO GENERAL PUBLIC LICENSE | |
Version 3, 19 November 2007 | |
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> | |
Everyone is permitted to copy and distribute verbatim copies | |
of this license document, but changing it is not allowed. | |
Preamble | |
The GNU Affero General Public License is a free, copyleft license for |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# Author: David Manouchehri <[email protected]> | |
# This script will always echo back data on the UDP port of your choice. | |
# Useful if you want nmap to report a UDP port as "open" instead of "open|filtered" on a standard scan. | |
# Works with both Python 2 & 3. | |
import socket |
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
ipset list | tail -n +9 - | xargs -I X vppctl glx overlay route add table 1024 X/32 acc tunnel1 1 |
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 | |
logger -t "dnsmasqlivecheck" "dnsmasq live check run" | |
if [[ ! -f /run/dnsmasq/dnsmasq.pid ]]; then | |
logger -t "dnsmasqlivecheck" "dnsmasq pid not present, restart" | |
systemctl restart dnsmasq | |
exit 1 | |
fi |
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
比如: | |
定义一个单链表,链表上一共有10个节点,每个节点是对应的数字编号(1到10),要求实现从链表尾部打印编号的程序,也即打出的结果是10到1。 | |
要求: |
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
version: '3' | |
services: | |
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch:7.13.1 | |
restart: unless-stopped | |
hostname: NODE_NAME | |
ulimits: | |
memlock: | |
soft: -1 | |
hard: -1 |
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
import sys | |
# choose() is the same as computing the number of combinations. Normally this is | |
# equal to: | |
# | |
# factorial(N) / (factorial(m) * factorial(N - m)) | |
# | |
# but this is very slow to run and requires a deep stack (without tail | |
# recursion). | |
# |
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
-----BEGIN RSA PRIVATE KEY----- | |
MIIEogIBAAKCAQEAyANWv5g2/AyV28I+l4Tfk5tnCVdCJt6RMTjMPo7CO3cymvTS | |
a4IClFR7+ArdpcWHLaNBSZYBn7dOmGKwCdOO8y7/i3P83h4mc+y67BMPsKm7+TKs | |
Klck/Ssy7cm8mCUs9Y5OuMiX7FDWEf0uzRzwN3OXbb2pU3/iMeD6j48PgTwwVlEu | |
lgr21GwjvLlBU00iKDH8fwq7NYxLJdhuXc0sbkTEZZcA6kRwfSwq4Q9iY5DGeMkJ | |
TT1L53XCAax0yUCsX0K3I5vP33RJ/M9GxpWBKYohk6lnHtf4n/Nst+EN7XkL8baf | |
7g1zTwXkt9FrqJgmyBmCQ1gTKBbjGPy0v2TniwIDAQABAoIBAGlUoM17SpGHyy+U | |
5sOCfP9N2oAnzLWNhibGw4C6S31nc2X5QgrNx6/3oeVpS3puQJb/H3WyIp7KuQA1 | |
EIHMQL6+ZGM7LNKITDXGWFXUX/HoIQ7F6bbOd7M/ma1yDPiOs1OJotlbAe64T1Pf | |
4lKwR6zcGcX4GIDZmvQrh6gsbbzfV1v/sVkSUJAWUXs5O7NMTj8UqMDZGx0bv9DX |
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
#!/usr/bin/env bash | |
# Step 1: Fill in EMAIL, TOKEN, DOMAIN and SUBDOMAIN. Your API token is here: https://www.cloudflare.com/a/account/my-account | |
# Make sure the token is the Global token, or has these permissions: #zone:read, #dns_record:read, #dns_records:edit | |
# Step 2: Create an A record on Cloudflare with the subdomain you chose | |
# Step 3: Run "./ddns.sh -l" to get the zone_id and rec_id of the record you created. | |
# Fill in ZONE_ID and REC_ID below | |
# This step is optional, but will save you 2 requests every time you this script | |
# Step 4: Run "./ddns.sh". It should tell you that record was updated or that it didn't need updating. | |
# Step 5: Run it every hour with cron. Use the '-s' flag to silence normal output |
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
1. speedtest ssl cert verification issue (no local ca chain, thus need set this before make python https connection) | |
export PYTHONHTTPSVERIFY=0 |
NewerOlder