Skip to content

Instantly share code, notes, and snippets.

View yelinaung's full-sized avatar
🏠
Working from home

Ye Lin Aung yelinaung

🏠
Working from home
View GitHub Profile
@yelinaung
yelinaung / amp_deep.md
Created July 20, 2026 10:55 — forked from AlotOfBlahaj/amp_deep
amp_deep_mode_2026_02_21

You are Amp. You and the user share the same workspace and collaborate to achieve the user's goals.

You are a deeply pragmatic, effective software engineer. You take engineering quality seriously, and collaboration is a kind of quiet joy: as real progress happens, your enthusiasm shows briefly and specifically. You communicate efficiently, keeping the user clearly informed about ongoing actions without unnecessary detail.

Working with the user

You interact with the user through a terminal. You have 2 ways of communicating with the users:

  • Share intermediary updates in commentary channel.
  • After you have completed all your work, send a message to the final channel. You are producing plain text that will later be styled by the program you run in. Formatting should make results easy to scan, but not feel mechanical. Use judgment to decide how much structure adds value. Follow the formatting rules exactly.
// YELIN MONGO UTILS
// get index usage
db.orders.aggregate( [ { $indexStats: { } } ] )
// find connection status
ar status = db.serverStatus()
status.connections
// kill operations taking longer than 5s
@yelinaung
yelinaung / asyncio_waiting.py
Created September 28, 2021 09:24
Asyncio demo
import time
import asyncio
import logging
import aiohttp
logging.basicConfig(
format='%(asctime)s %(levelname)-8s %(message)s',
level=logging.INFO,
datefmt='%Y-%m-%d %H:%M:%S')
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: my-hpa
namespace: sg-prod
annotations:
metric-config.object.istio-requests-total.prometheus/per-replica: "true"
metric-config.object.istio-requests-total.prometheus/query: |
sum(rate(istio_requests_total{reporter="destination", destination_workload="<deployment-name-here>"}[2m]))
spec:
#!/bin/bash
NAME=$1
HOST=$2
PORT=$3
if [ -z "$3" ]; then
echo "$0 [name] [ip] [port]"
exit 1
fi
@yelinaung
yelinaung / tutorial.md
Created July 20, 2018 01:49 — forked from swalkinshaw/tutorial.md
Designing a GraphQL API

Tutorial: Designing a GraphQL API

This tutorial was created by Shopify for internal purposes. We've created a public version of it since we think it's useful to anyone creating a GraphQL API.

It's based on lessons learned from creating and evolving production schemas at Shopify over almost 3 years. The tutorial has evolved and will continue to change in the future so nothing is set in stone.

Keybase proof

I hereby claim:

  • I am yelinaung on github.
  • I am yelinaung (https://keybase.io/yelinaung) on keybase.
  • I have a public key ASATtA1d5QNT3Nu0q73LRZiQLFrmVi5vgAfbNdqvaZeiBwo

To claim this, I am signing this object:

@yelinaung
yelinaung / tree.md
Created December 28, 2017 03:01 — forked from hrldcpr/tree.md
one-line tree in python

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!

Bash shortcuts

Command Description
Ctrl + a To the beginning of the line
Ctrl + e To the end of the line
Alt + b One word back
Alt + f One word forward
Ctrl + k Delete to the end of the line
Ctrl + u Delete to the beginning of the line
package main
import "fmt"
import "unicode/utf8"
func main() {
str1 := "ခ"
str2 := "a"
str3 := "界"