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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDVbeZcLeYUjeBQdWBIw0/+3dNshXMC9oeszs5MAf4Mm0F/VlDxouZjJ84fI6JXtlLOpRBEJ6ZT8lUG3V6ELwCVXoa2FYVWU4FxhBuVascEFrXjBqaF0LlhmSgQmknrsx/Q6lVOVKjUs6cK6KHPVBOf7tv3v5kpinl8vyKeein3fKm1tAjTIIDtv6DFp8XFbN3UKltDJF1PJfaDLUhH/0TIePQSE6jNI2A70viJEBW1N/28/vj8ZMQ8hUk2nfMM0d+PDK1a2TS2SzMh5VjTxQPfElM68uf65qiukQdm+dUtncs66e2jjV1dGat88cffwgVLXUYRfby+bCzJ/meHTHXpb1TaQN+I4wgTqyFw4mdY8ujAifceCk5MLffjKTuurXh5Her75Ntrex0YOHk+zqUTs7y5XyJ+Y1rCiUystqrU+YhXBhrr3K+PXH4L7iz2N9A3dLbrQ/mxfPQ8PN+ApxJGFMiT5rZj7RtmVsmDExGaq5v6bAaKGln2Ml+4CkF20kSaimChEgc3Zn/U6XSCwzFOQAttPB1pByluHoJ26KjXBqqQNhuBsXEpFJ9nN3UQ1PJV1TPkE2znmsvlcgX10ZRPHs/UPyAM/8AHfsgOktkAlst6b7hgy6rk+EPhIjLz0l+r4Ckh0tJorhskHnV7KRB/fPZ/8yAOQ82xhZjFKdG8lw== viz |
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 | |
[ $# -eq 1 ] || { echo "Usage: $0 URL" >&2; exit 1; } | |
GD_DIR_MIME='application/vnd.google-apps.folder' | |
JQ_COND_DIR="select(.mimeType == \"${GD_DIR_MIME}\")" | |
JQ_COND_FILE="select(.mimeType != \"${GD_DIR_MIME}\")" | |
URL="${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 -e | |
# 用于在维护后启动 TFCLOUD 实例的脚本 | |
# 获取更新:https://gist.github.com/vizv/e55741af2b16acad861a424549bae520 | |
# boot.sh Copyright (C) 2020 Viz <viz@linux.com> | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or |
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
setting: | |
source: | |
dir: src | |
format: jpg | |
output: | |
dir: _output | |
format: jpg | |
height: 1920 | |
width: 1350 | |
digits: 3 |
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 -e | |
SRC=source | |
MARGIN=5 | |
WIDTH=512 | |
HEIGHT=512 | |
function step() { | |
PREV="$1" | |
CURR="$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
#!/bin/sh -e | |
AUTH_KEY='' | |
QQ='' | |
SESSION_KEY="$(http :8080/auth "authKey=${AUTH_KEY}" | jq -r .session)" | |
[ "$(http :8080/verify "sessionKey=${SESSION_KEY}" "qq=${QQ}" | jq '.code')" = 0 ] || exit 1 | |
echo "SESSION_KEY=${SESSION_KEY}" |
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
// gcc -Wall tracker_log_analyzer.c && ./a.out | sort | uniq -c | sort -nr > rank.txt | |
#include<stdio.h> | |
#include<stdlib.h> | |
#include<string.h> | |
#include<ctype.h> | |
#define BUF_SIZE (1024 * 64) | |
#define PREFIX "info_hash=" |
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
# ls -1prt | grep -v "/$" | cat -n | while read n f; do mv -n "${f}" "$(printf "%03d" $n).${f#*.}"; done | |
# ls *.docx | sed 's/\(.*\)\.docx/pandoc & -o \1.html/g' | sh | |
# ls *.html | sed 's/\(.*\)\.html/pup --plain "body" "text{}" < & | rg -v "^$" > \1.txt/g' | sh | |
# ruby parse.rb | |
# printf '\xEF\xBB\xBF' | cat - output.csv > bom.csv | |
require 'csv' | |
txts = Dir['*.txt'] | |
CSV.open('output.csv', 'w') do |csv| |
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
// Reference: https://awsteele.com/blog/2020/09/26/aws-access-key-format.html | |
const ACCOUNT_OFFSET = 549755813888 // QAAAAAAA | |
const ACCOUNT_ID_MAX = 10 ** 12 | |
const AWS_BASE32_CHARSET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567' | |
const AWS_BASE32_CHARSET_FULL_LEN = AWS_BASE32_CHARSET.length | |
const AWS_BASE32_CHARSET_HALF_LEN = AWS_BASE32_CHARSET_FULL_LEN / 2 | |
const BYTE_MAX = 2 ** 8 | |
const SECRET_BYTES = 30 |
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
apiVersion: k0s.k0sproject.io/v1beta1 | |
kind: Cluster | |
metadata: | |
name: k0s | |
spec: | |
api: | |
address: 10.224.0.8 | |
port: 6443 | |
k0sApiPort: 9443 | |
sans: |