Skip to content

Instantly share code, notes, and snippets.

View AGou-ops's full-sized avatar
💭

Sephiroth AGou-ops

💭
View GitHub Profile
@AGou-ops
AGou-ops / bookmarkGroups.json
Created July 10, 2020 14:55
sync electerm data
[{"id":"default","title":"default","bookmarkIds":["Bh9_wgLA4","DHSTy6YMh","j6j0CmFoL","4kUGWiBr7","A3d-LjH2c","3kU54apV8","UJweAN8Y8","atFJMqf6i","fJLzRPMQF"],"bookmarkGroupIds":[]},{"id":"V3c4ObOiF","title":"Cloud Server","bookmarkIds":["JHDAzlm7I"]},{"id":"sSg9Xhu3F","title":"Ceph Cluster","bookmarkIds":["jWLjVz_S_","u_c7dT7OK","UhyNkP1oo"]}]
@AGou-ops
AGou-ops / adb_iso_country.txt
Created April 8, 2021 17:19 — forked from dominicthomas/adb_iso_country.txt
This enables you to change the sim country iso of the android emulator. This and more info here: http://stackoverflow.com/questions/2637606/how-do-i-change-the-mobile-country-code-mcc-in-the-android-emulator
adb shell setprop gsm.sim.operator.iso-country gb
@AGou-ops
AGou-ops / resort-files.sh
Created August 25, 2021 03:03
根据excel中的文件列表,对图片文件按照年月的格式进行重新归档并输出相关日志。
#!/bin/bash
#
#**************************************************
# Author: AGou-ops *
# E-mail: agou-ops@foxmail.com *
# Date: 2021-08-10 *
# Description: Re-sort picture file *
# Copyright 2021 by AGou-ops.All Rights Reserved *
#**************************************************
set -euo pipefail
@AGou-ops
AGou-ops / .vimrc
Created September 3, 2021 09:30
my vim dotfile
" AGou-ops VIMRC FILE -- Update Date: 2021-08-11
set nocompatible " be iMproved, required
"
" Begin Plug, Depends On https://github.com/junegunn/vim-plug
call plug#begin('~/.vim/plugged')
Plug 'junegunn/vim-plug'
Plug 'scrooloose/nerdtree'
Plug 'scrooloose/nerdcommenter'
@AGou-ops
AGou-ops / install_ipv6_tunnel.sh
Last active May 3, 2022 11:11
快速安装IPv6隧道脚本(tunnelbroker)
#!/usr/bin/env bash
set -euo pipefail
#
#**************************************************
# Author: AGou-ops *
# E-mail: agou-ops@foxmail.com *
# Date: 2021-12-02 *
# Description: *
# Copyright 2021 by AGou-ops.All Rights Reserved *
# 重装系统至Debian11
bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/MoeClub/Note/master/InstallNET.sh') -d 11 -v 64 -p "密码" -port "端口"
wget -N --no-check-certificate "https://github.000060000.xyz/tcpx.sh" && chmod +x tcpx.sh && ./tcpx.sh
apt install wget -y
# 模式选择11即可,然后重启reboot
# bbr优化脚本
bash <(curl -Ls https://github.com/lanziii/bbr-/releases/download/123/tools.sh)
# 运行两次,第一次选2,第二次选3
@AGou-ops
AGou-ops / Golang 闭包函数示例1.go
Last active January 26, 2022 06:28
斐波那契数列两种闭包实现&为字符串添加后缀的闭包工厂函数
package main
import (
"fmt"
"strings"
"time"
)
// 斐波那契数列实现1
func fibonacci() func(int) int {
@AGou-ops
AGou-ops / surfingkeys.settings
Last active March 14, 2022 01:45
Default Surfingkeys Settings
const {
unmap,
iunmap,
vunmap,
aceVimMap,
mapkey,
imap,
imapkey,
getClickableElements,
vmapkey,
链接两个独立的系统或者软件,即使他们有着不同的接口,但是通过中间件都仍能实现信息交换.
常见的中间件有:Tomcat/JBoss(web服务器)/Kfaka/Redis/influxdb/zookeeper/RabbitMQ
lvs的三种工作模式,dr直接路由模式,tun隧道模式,nat模式
- nat: 客户端发送数据包到lvs负载均衡器,在负载均衡器上将数据包的目的ip换为后端rs的ip,rs接受数据包并作出相应将返回的数据包发送给负载均衡器,负载均衡器将SIP替换成自己的ip,最后将响应的数据包发送给客户端
优点是:集群中的物理服务器可以使用任何支持TCP/IP操作系统,只有负载均衡器需要一个合法的IP地址。
缺点:扩展性有限。当服务器节点(普通PC服务器)增长过多时,负载均衡器将成为整个系统的瓶颈。
@AGou-ops
AGou-ops / iterm2_key.json
Last active August 5, 2022 08:18
MacOS偏门解决vim/Neovim光标跳转(j/k键)卡顿的问题。【使用karabiner】
{
"title": "iterm2 - by: AGou-ops.cn",
"rules": [
{
"description": "Change left_shift to command+spacebar if pressed alone in iterm2",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_shift"