Skip to content

Instantly share code, notes, and snippets.

View SathyaBhat's full-sized avatar
🎶

Sathyajith Bhat SathyaBhat

🎶
View GitHub Profile
@SathyaBhat
SathyaBhat / kops.sh
Last active March 18, 2018 01:51
Bring up kops cluster
#!/bin/bash
aws iam create-group --group-name kops
aws iam attach-group-policy --policy-arn arn:aws:iam::aws:policy/AmazonEC2FullAccess --group-name kops
aws iam attach-group-policy --policy-arn arn:aws:iam::aws:policy/AmazonS3FullAccess --group-name kops
aws iam attach-group-policy --policy-arn arn:aws:iam::aws:policy/AmazonRoute53FullAccess --group-name kops
aws iam attach-group-policy --policy-arn arn:aws:iam::aws:policy/IAMFullAccess --group-name kops
aws iam attach-group-policy --policy-arn arn:aws:iam::aws:policy/AmazonVPCFullAccess --group-name kops
aws iam create-user --user-name kops
@SathyaBhat
SathyaBhat / docker-compose.yml
Created August 30, 2018 13:24
Docker compose for drone
version: '3.5'
services:
drone-server:
image: drone/drone:0.8
ports:
- 80:8000
- 9000:9000
volumes:
- dronedata:/var/lib/drone
restart: always
@SathyaBhat
SathyaBhat / mysqldump
Last active March 14, 2019 07:19
MySQL Compressed Backup
mysqldump -u <user> -p -h <host> --databases <db name> | gzip > <file>
@SathyaBhat
SathyaBhat / am.tmpl
Last active July 2, 2020 14:10
Iterate through all common annotations and labels in AlertManager templates
*Common Annotations*
{{ range .CommonAnnotations.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
{{ end }}
*Common Labels*
{{ range .CommonLabels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
{{ end }}
@SathyaBhat
SathyaBhat / gist:e0da09d9214b46551c3a98dce46a710e
Created April 18, 2023 04:54
Filtering logs in CloudWatch Log Insights
fields @timestamp, @message, @logStream, @log
| filter @message not like /RequestId|Verbose|INIT_START|Importing/
| sort @timestamp desc