Skip to content

Instantly share code, notes, and snippets.

View SathyaBhat's full-sized avatar
🎶

Sathyajith Bhat SathyaBhat

🎶
View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<opml version="2.0">
<head>
<title>Miniflux</title>
<dateCreated>Sat, 25 Apr 2026 07:27:18 UTC</dateCreated>
</head>
<body>
<outline text="AWS">
<outline title="AWS Heroes" text="AWS Heroes" xmlUrl="https://dev.to/feed/aws-heroes" htmlUrl="https://dev.to/aws-heroes" description="The latest articles on DEV Community by AWS Heroes (@aws-heroes)." type="rss"></outline>
<outline title="AWS News" text="AWS News" xmlUrl="https://aws.amazon.com/blogs/aws/feed/" htmlUrl="https://aws.amazon.com/blogs/aws/" description="Announcements, Updates, and Launches" type="rss"></outline>
@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
@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 / mysqldump
Last active March 14, 2019 07:19
MySQL Compressed Backup
mysqldump -u <user> -p -h <host> --databases <db name> | gzip > <file>
@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 / 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 / vim-bufdo
Last active April 13, 2017 09:14
vim bufdo example
Snippet to replace a sentence across multiple buffers in Vim. The `update` writes the changes to the file.
bufdo %s/depends 'mysql2_chef_gem', '\~> 1.0.1'// | update
@SathyaBhat
SathyaBhat / mysql_stored_procs.sh
Created January 25, 2017 07:15
mysql download only stored procedures
mysqldump -n -t -d -R -u <username> -p -h <host name> <database> stored_procs.sql
@SathyaBhat
SathyaBhat / get_git_branches.sh
Created January 11, 2017 13:04
Get a list of all branches from a repository
#! /bin/bash
#Replace {GIT_URL} with your repo
git ls-remote --heads {GIT_URL} | aws -F" " '{print $NF}' | cut -c12- -
@SathyaBhat
SathyaBhat / gist:25a3cd875975fc4403e67bf9c93eef03
Created July 25, 2016 10:51
Rename extensions of multiple files
rename "s/oldExtension/newExtension/" *.txt
via http://unix.stackexchange.com/a/159466/1648