Skip to content

Instantly share code, notes, and snippets.

View alazycoder101's full-sized avatar

Lazy coder alazycoder101

View GitHub Profile
@alazycoder101
alazycoder101 / coc-fix-endwise.md
Last active December 25, 2022 11:34
vim-endwise conflict with COC
let g:endwise_no_mappings = v:true
inoremap <expr> <Plug>CustomCocCR pumvisible() ? coc#_select_confirm() : "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
imap <CR> <Plug>CustomCocCR<Plug>DiscretionaryEnd

nvim-lua/completion-nvim#202

verbose imap <CR>
  &amp;@63_AutoPairsReturn
@alazycoder101
alazycoder101 / nginx-configmap.yml
Last active December 25, 2022 11:35
configmap for nginx
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-conf
namespace: re
data:
nginx.conf: |
user nginx;
# should equal to `cat /proc/cpuinfo | grep processor | wc -l`
worker_processes auto;
@alazycoder101
alazycoder101 / nginx-service.yml
Created October 23, 2021 09:01
k8s service for nginx
apiVersion: v1
kind: Service
metadata:
name: nginx
annotations:
# Internal load balancer
cloud.google.com/load-balancer-type: "Internal"
spec:
type: LoadBalancer
ports:
@alazycoder101
alazycoder101 / nginx-deployment.yml
Created October 23, 2021 09:02
nginx deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx
spec:
selector:
matchLabels:
app: nginx
replicas: 1
template:
@alazycoder101
alazycoder101 / pgpool-configmap.yaml
Created October 23, 2021 09:05
pgpool configmap
apiVersion: v1
kind: ConfigMap
metadata:
name: pgpool-config
labels:
name: pgpool-config
data:
pgpool.conf: |-
listen_addresses = '*'
port = 9999
@alazycoder101
alazycoder101 / pgpool-deployment.yml
Created October 23, 2021 09:08
pgpool deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: pgpool
labels:
app: pgpool
spec:
replicas: 1
selector:
matchLabels:
@alazycoder101
alazycoder101 / busybox-pod.yml
Created October 23, 2021 09:12
busybox pod to debug
# debugger.yaml
kind: Pod
apiVersion: v1
metadata:
name: toolkit
spec:
volumes:
- name: volume-to-debug
persistentVolumeClaim:
claimName: postgres-data-0
@alazycoder101
alazycoder101 / mongo-deployment.yml
Created October 23, 2021 09:15
mongo deployment in k8s
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: mongo
spec:
selector:
matchLabels:
role: mongo
environment: production
serviceName: "mongo"
@alazycoder101
alazycoder101 / mongo-headless.yml
Created October 23, 2021 09:16
mongo headless service
apiVersion: v1
kind: Service
metadata:
name: mongo
labels:
name: mongo
spec:
ports:
- port: 27017
targetPort: 27017
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="grab bandwidth from Network Information.">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Network Information</title>
<style>