Skip to content

Instantly share code, notes, and snippets.

View Ticiano-mw's full-sized avatar

Ticiano Herrera Ticiano-mw

View GitHub Profile
@subfuzion
subfuzion / curl.md
Last active April 17, 2024 04:24
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@hofmannsven
hofmannsven / README.md
Last active April 7, 2024 09:28
Git CLI Cheatsheet
@ruanbekker
ruanbekker / cheatsheet-elasticsearch.md
Last active March 20, 2024 02:45
Elasticsearch Cheatsheet : Example API usage of using Elasticsearch with curl
@epcim
epcim / kubernetes_pods_docker_disk_usage.md
Last active January 22, 2024 03:57
docker disk space introspection kubernetes docker overlay

identify big pods/containers

investigage big files

DST=/mnt
find /var/lib -type f -size +1G -exec ls -lh {} \; | tee  $DST/bigfiles_var_lib_$(date "+%H%M").log
find /var/lib -type f -size +1G -exec ls -lh {} \; | awk '{ print $5 ": " $9 }' | sort -rh > $DST/bigfiles_var_lib_$(date "+%H%M").sorted.log

misbehave processes

@kerr-bighealth
kerr-bighealth / config.tf
Created January 28, 2020 20:08
iam-user module
terraform {
required_version = ">=0.12, <0.13"
}
@superseb
superseb / cleanup.sh
Last active June 19, 2023 10:03
Cleanup host added as custom to Rancher 2.0
#!/bin/sh
# OUTDATED: please refer to the link below for the latest version:
# https://github.com/rancherlabs/support-tools/blob/master/extended-rancher-2-cleanup/extended-cleanup-rancher2.sh
docker rm -f $(docker ps -qa)
docker volume rm $(docker volume ls -q)
cleanupdirs="/var/lib/etcd /etc/kubernetes /etc/cni /opt/cni /var/lib/cni /var/run/calico /opt/rke"
for dir in $cleanupdirs; do
echo "Removing $dir"
rm -rf $dir
done
@Ticiano-mw
Ticiano-mw / cheatsheet-elasticsearch.md
Created August 5, 2021 00:10 — forked from ruanbekker/cheatsheet-elasticsearch.md
Elasticsearch Cheatsheet : Example API usage of using Elasticsearch with curl
@fauberso
fauberso / kubernetes-gencerts.sh
Created May 11, 2020 16:09
Generates self-signed tls secrets for kubernetes. Run this with e.g. 'kubernetes-gencerts microk8s.local', then install the secrets with 'kubectl apply -f microk8s.local.yaml'
#!/bin/bash
HOSTNAME=${1:-localhost}
openssl req -newkey rsa:2048 -nodes -keyout $HOSTNAME.key -x509 -days 3650 -out $HOSTNAME.crt
echo "apiVersion: v1
kind: Secret
metadata:
name: $HOSTNAME.tls
namespace: default
type: kubernetes.io/tls
data: