serkan haytac
Search... ⌘K

All Posts

22 posts

3 min read

AWS CLI Notes

[cloudfront](#cloudfront) | [ec2](#ec2) | [ecr](#ecr) | [elb](#elb) | [ecs](#ecs) | [events](#events) [kms](#kms) | [sns](#sns) | [s3](#s3) | [resourc

Read more
3 min read

Awk Notes

**To format strings in awk use `printf`**

Read more
3 min read

Searching github with multiple topics.

Github.com ui .currently does not natively supoport search for multiple topic tags as of now. However their api allows you to query multiple tags. Bel

Read more
3 min read

Setup env variables for VScode integrated terminal.

If you are working on a project that involves multiple aws profiles and vscode, this trick might come handy. Depending on the project you would like t

Read more
3 min read

Filter and delete s3 objects by date.

➜ ~ aws s3api list-objects --bucket fake-bucket --query 'Contents[?LastModified>=`2018-10-04` ].{Key:Key}' --prefix "2018-10-04" --output text | xar

Read more
3 min read

Serverless Framework cheat sheet.

➜ project serverless create --template aws-nodejs

Read more
3 min read

Search aws security groups for a given ip address.

➜ ~ aws ec2 describe-security-groups --query 'SecurityGroups[?IpPermissions[?contains(IpRanges[].CidrIp, `0.0.0.0/0`)]].{GroupId: GroupId, GroupName:

Read more
3 min read

jq Cheat Sheet

➜ curl http://serkanh.github.io/download/example.json | jq '.[:2]'

Read more
3 min read

Useful EC2 cli commands.

[AWS Docs](https://docs.aws.amazon.com/cli/latest/userguide/controlling-output.html)

Read more
3 min read

Useful aws cli rds commands i use often.

aws --profile=HA rds describe-db-instances --query 'DBInstances[?DBInstanceIdentifier==`evox-dev`]'

Read more
3 min read

Some useful cloudtrail commands i use often.

[AWS Docs](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events-cli.html#attribute-lookup-example)

Read more
3 min read

TIL -AWS has a nice api endpoint to get its ip ranges.

>> curl -s https://ip-ranges.amazonaws.com/ip-ranges.json | jq -r '.prefixes[] | select(.service=="EC2") | .ip_prefix'

Read more
3 min read

Useful github search queries

rbac filename:package.json

Read more
3 min read

Server-Side Encryption with Customer-Provided Encryption Keys

Per AWS docs requirements for encryptions are:

Read more
3 min read

Encrypting files with rsa key pairs.

My day job i use ssh... alot. When you manage hundreds of servers with mission critical infastructure running on passswordless login with ssh keys can

Read more
3 min read

Save screenshot to clipboard on OSX

Screenshots are saved as .png files on the desktop in Mac OS X v10.6 and later. They're automatically named "Screen Shot date at time .png." To save y

Read more
3 min read

OpenVpn Setup with Docker

This is a basic summary of excellent tutorial from Digital Ocean on how to setup OpenVpn with Docker.

Read more
3 min read

Bastion Host Setup for CoreOS

A common server access pattern is to prevent any connection to your production servers from outside of their private subnet, and use a bastion host to

Read more
3 min read

Quickstart with Vault

Vault is a secure storage server that secures, stores, passwords, tokens, API keys etc. It is the from Hashicorp which had some great products such as

Read more