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 https://gist.github.com/likamrat/cae833a6e5b3461709f14c093c21c293?permalink_comment_id=4634351#gistcomment-4634351 | |
# Install Chocolately Package Manager | |
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12 | |
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
$env:Path = [System.Environment]::ExpandEnvironmentVariables([System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")) | |
# Install WinGet from Chocolatey | |
choco install winget | |
choco install winget.powershell |
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 ipaddress | |
def hex_to_cidr(hex_str): | |
i = 0 | |
while i < len(hex_str): | |
# The first byte is the mask | |
mask = int(hex_str[i:i+2], 16) | |
i += 2 | |
# Calculate how many bytes the subnet will occupy |
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 cv2 | |
import pyqrcode | |
import numpy as np | |
import io | |
# Set the width, height and frame rate of the video | |
width, height, fps = 512, 512, 10 | |
# Create a video writer object, using FFmpeg |
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 | |
set -xe | |
apt install -y build-essential git gcc-arm-none-eabi bison flex device-tree-compiler bc debootstrap | |
BASE=${BASE:-$(mktemp -d)} | |
cd $BASE | |
pwd | |
git clone https://github.com/ARM-software/arm-trusted-firmware.git |
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/sbin/nft -f | |
chain tc-wan { | |
# check default priority | |
mark & 0xff0 == 0x130 ip dscp set af22 return | |
# real-time application | |
## Dota2 | |
udp dport 27000-27200 \ | |
meta mark set mark & 0xfffff00f ^ 0x110 ip dscp set af41 return |
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/sh | |
# example: ./ramdom-ipv6.sh 2402:f000:1::/48 166.111.21.1 | |
table_id=436298364 | |
ipv6_cidr=$1 | |
ipv4_addr=$2 | |
ipv6_prefix=$(echo $ipv6_cidr | cut -d / -f 1) | |
ipv6_sublen=$(echo $ipv6_cidr | cut -d / -f 2) |
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 | |
# require: git version > 2.3 | |
# require: `db/letsencrypt` existed in git repo | |
if [[ -z "$CERTBOT_DOMAIN" ]] || [[ -z "$CERTBOT_VALIDATION" ]]; then | |
echo '$CERTBOT_DOMAIN and $CERTBOT_VALIDATION environment variables required.' | |
fi | |
source /etc/letsencrypt/dns-auth.conf |
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
alicdnkk.miaopai.com 2 1.2 1.2 | |
s3-static.lufaxcdn.com 2 1.2 2.4 | |
ali-ind-cdn.kwai.net 2 1.2 3.6 | |
c3.xinstatic.com 2 1.2 4.8 | |
cdn.scdng.com 2 1.2 6.1 | |
jzsite.cdnpe.com 2 1.2 7.3 | |
qncdnbb.miaopai.com 2 1.2 8.5 | |
aliyuncdn-monitortestp-res.mzres.com 2 1.2 9.7 | |
ottvideogs.hifuntv.com 2 1.2 10.9 | |
wylivetest.cdnpe.com 2 1.2 12.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
Homebrew build logs for sjk on macOS 10.12.4 | |
Build date: 2017-05-05 23:32:08 |
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.0.1.0/24 | |
1.0.2.0/23 | |
1.0.8.0/21 | |
1.0.32.0/19 | |
1.1.0.0/24 | |
1.1.2.0/23 | |
1.1.4.0/22 | |
1.1.9.0/24 | |
1.1.10.0/23 | |
1.1.12.0/22 |
NewerOlder