Skip to content

Instantly share code, notes, and snippets.

View aliasmee's full-sized avatar
🎯
Focusing

飞走不可 aliasmee

🎯
Focusing
View GitHub Profile
@aliasmee
aliasmee / wss-ingress.yaml
Last active December 10, 2021 15:30
wss ingress example
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
nginx.ingress.kubernetes.io/server-snippets: |
location / {
proxy_set_header Upgrade $http_upgrade;
@aliasmee
aliasmee / java_download.sh
Created July 14, 2021 03:58 — forked from wavezhang/java_download.sh
download java from oracle without login
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz
@aliasmee
aliasmee / http-benchmark.md
Created June 28, 2021 05:16 — forked from denji/http-benchmark.md
HTTP(S) Benchmark Tools / Toolkit for testing/debugging HTTP(S) and restAPI (RESTful)
# Install these packages (use your favorite AUR tool here)
yay -S minikube kubectl docker-machine-driver-kvm2 libvirt qemu-headless ebtables
# Get libvirt going
sudo systemctl enable libvirtd.service
sudo usermod -a -G libvirt $(whoami)
# This fix thanks to http://blog.programmableproduction.com/2018/03/08/Archlinux-Setup-Minikube-using-KVM/
sudo virsh net-autostart default
@aliasmee
aliasmee / 彻底删除cilium教程
Created October 26, 2020 10:28
无法彻底清理cilium留下的问题
### 问题
在尝试安装完cilium之后,发现运行都crash,查看原因,是内核版本不匹配,需要4.xx,实际我的主机是3.10,所以先准备移除cilium,等待升完内核之后,再来安装。
简单使用
```bash
kubectl delete -f https://raw.githubusercontent.com/cilium/cilium/v1.8/install/kubernetes/quick-install.yaml
```
问题就这样出现了。表面上看似是从集群删除了。但是在其他容器重启或者更新发布之后,发现无法启动了,容器状态一直在containercreating状态。比如
@aliasmee
aliasmee / ansible_modify_hostname.yaml
Last active January 11, 2020 08:53
modify /etc/hosts file hostname from inventory file
REF: https://gist.github.com/phips/11233502
- name: Ensure hostname set from inventory file
tags: etchostsupdate
hostname: name={{ inventory_hostname }}
when: not inventory_hostname|match('(\d{1,3}\.){3}\d{1,3}')
- name: Update the /etc/hosts file with node name
tags: etchostsupdate
become: yes
@aliasmee
aliasmee / install_ikev2_in_3_minute
Last active September 18, 2019 02:56
step by step install ikev2 vpn
### Install Docker REF: https://docs.docker.com/install/linux/docker-ce/ubuntu/
VPN HOST: 35.222.170.153
sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
@aliasmee
aliasmee / curl.sh
Created August 28, 2018 16:17
Jenkins awesome
#!/bin/bash
# Jenkins input curl process
# inputID is set input id: ""
curl -X POST https://admin:token@jenkins_server_url/job/projectname/job/branch/BUILD_NUMBER/input/inputID/proceedEmpty
curl -X POST https://admin:token@jenkins_server_url/job/projectname/job/branch/BUILD_NUMBER/input/inputID/abort
@aliasmee
aliasmee / Result.java
Last active August 28, 2018 16:12
why currentBuild's result must be {SUCCESS,UNSTABLE,FAILURE,NOT_BUILT,ABORTED}, if result values is other ,result will return FAILURE. Refe: https://github.com/jenkinsci/jenkins/blob/08def67a18eee51de9f3f99bc2a792fee1c160e0/core/src/main/java/hudson/model/Result.java
/*
* The MIT License
*
* Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is