Skip to content

Instantly share code, notes, and snippets.

View bfgits's full-sized avatar

Simon bfgits

  • Shenzhen
View GitHub Profile
AA=aa
aB=lafdjlj
A_URL=https://www.github.com/
TEAMS_WEBHOOK=https://test11.webhook.office.com/webhookb2/fasfafa@b4f51
# dotenv posix
# This line is a comment, The above line is a directive
COMMENT=This-#-is-a-character # This is a comment
COMMENT2=This-#-is-a-character
UNQUOTED=value1 # Spaces and some special characters cannot be used
#!/bin/bash -ex
ARCH=darwin
#ARCH=linux
VAULT_VERSION=1.5.3
PACKER_VERSION=1.6.2
CONSUL_VERSION=1.8.4
@bfgits
bfgits / 验证中国身份证 前6位对应地区码
Created September 3, 2022 12:36 — forked from mayufo/验证中国身份证 前6位对应地区码
验证中国身份证 前6位对应地区码
var GB2260 = {
"110000": "北京市",
"110100": "北京市市辖区",
"110101": "北京市东城区",
"110102": "北京市西城区",
"110103": "北京市崇文区",
"110104": "北京市宣武区",
"110105": "北京市朝阳区",
"110106": "北京市丰台区",
"110107": "北京市石景山区",
@bfgits
bfgits / principles.md
Created May 16, 2022 01:43 — forked from johnpryan/principles.md
Ray Dalio's Principles

Summary And Table Of Life Principles

Think for yourself to decide 1) what you want, 2) what is true, and 3) what you should do to achieve #1 in light of #2, and do that with humility and open-mindedness so that you consider the best thinking available to you.

Life Principles Introduction

Look to the patterns of those things that affect you in order to understand the cause-effect relationships that drive them and to learn principles for dealing with them effectively.

Part II: Life Principles

curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
echo 'source <(kubectl completion bash)' >>~/.bashrc
@bfgits
bfgits / install-cfssl.sh
Created April 26, 2021 02:05
install cfssl cfssljson
curl -L https://github.com/cloudflare/cfssl/releases/download/v1.5.0/cfssl_1.5.0_linux_amd64 -o cfssl
chmod +x cfssl
curl -L https://github.com/cloudflare/cfssl/releases/download/v1.5.0/cfssljson_1.5.0_linux_amd64 -o cfssljson
chmod +x cfssljson
curl -L https://github.com/cloudflare/cfssl/releases/download/v1.5.0/cfssl-certinfo_1.5.0_linux_amd64 -o cfssl-certinfo
chmod +x cfssl-certinfo
@bfgits
bfgits / get_china_ip.sh
Last active April 5, 2024 00:01
get china ip
#!/bin/sh
#获取中国IP段
wget -c http://ftp.apnic.net/stats/apnic/delegated-apnic-latest
cat delegated-apnic-latest | awk -F '|' '/CN/&&/ipv4/ {print $4 "/" 32-log($5)/log(2)}' | cat > ./cn_ip_list.conf
# install ipset
apt-get install ipset -y
@bfgits
bfgits / install cfssl
Created February 24, 2021 02:35 — forked from guoyoujin/install cfssl
linux install cfssl
source:
https://pkg.cfssl.org/
install:
$ curl -s -L -o /bin/cfssl https://pkg.cfssl.org/R1.2/cfssl_linux-amd64
$ curl -s -L -o /bin/cfssljson https://pkg.cfssl.org/R1.2/cfssljson_linux-amd64
$ curl -s -L -o /bin/cfssl-certinfo https://pkg.cfssl.org/R1.2/cfssl-certinfo_linux-amd64
$ chmod +x /bin/cfssl*
@bfgits
bfgits / get-kubeconfig.sh
Created February 23, 2021 07:46
get-kubeconfig.sh
#!/bin/bash
# Copyright 2020 Gravitational, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@bfgits
bfgits / bot.rb
Created January 14, 2021 09:05 — forked from dideler/bot.rb
Sending a notification message to Telegram using its HTTP API via cURL
# Use this script to test that your Telegram bot works.
#
# Install the dependency
#
# $ gem install telegram_bot
#
# Run the bot
#
# $ ruby bot.rb
#