Skip to content

Instantly share code, notes, and snippets.

View geekbass's full-sized avatar

Weston Bassler geekbass

  • Emburse
  • Columbus, Ohio
View GitHub Profile
@geekbass
geekbass / ES-Admin-Cheatsheet.md
Created April 11, 2019 14:04
Elasticsearch Admin API Cheatsheet

Elasticsearch Admin Endpoint Cheatsheet

/_cluster/health?pretty: For the cluster health indicator.
/_status?pretty : For all information about all the indices.
/_nodes?pretty : For all information about the nodes.
@geekbass
geekbass / cloud-init.md
Last active April 8, 2024 15:18
Cloud Init Rescue

Rescue ec2 via Cloud-Init

If something takes over your instance and you lose ssh, here is a way that you can recover it via Cloud-init (As long as you are using Cloud-Init). Use boot_cmd to recover or undo anychanges that caused this.

Find the instance ID and stop it.

aws ec2 stop-instances --instance-ids i-instanceID --force

Create your file. Use boot_cmd as this will execute on boot every time. See https://cloudinit.readthedocs.io/en/latest/topics/examples.html?highlight=systemd#run-commands-on-first-boot for the details.

Base64 encode it.

@geekbass
geekbass / main.tf
Created April 15, 2019 17:48
DC/OS TF Infrastructure V2
# Find Public IP
data "http" "whatismyip" {
url = "http://whatismyip.akamai.com/"
}
# Begin Variables
variable "aws_ami" {
description = "AMI to use"
default = "ami-4bf3d731"
}
@geekbass
geekbass / debug.md
Last active June 29, 2021 19:06
kubectl debug Commands

Useful Kubectl Commands

kubectl run -i --tty --rm debug --image=curlimages/curl --restart=Never -- www.google.com -vvv

kubectl run -i --tty --rm debug --image=busybox --restart=Never -- sh


Testing Volume Mount from Configmap

@geekbass
geekbass / PLUGINS.md
Last active December 21, 2020 20:52
Pycharm Plugins