Skip to content

Instantly share code, notes, and snippets.

View xmlking's full-sized avatar
🌝
Write code that will last longer than You

Sumanth Chinthagunta xmlking

🌝
Write code that will last longer than You
View GitHub Profile

mac tips

  • Grep three lines....

    # highlight `app:`
    kustomize build $BASE | grep -C 3 app:
    
    # Compare the output directly to see how staging and production differ:
@xmlking
xmlking / ko.md
Created July 6, 2019 21:49
ko : Deploy GoLang microservices to k8s

Demo of ko

ko is a little unknown gem, lost in the GitHub maze.

ko is widely used in knative development but somehow very little advocacy has been done around this tool.

It allows you to:

  • build Go binaries
  • containerize them and publish to a registry
@xmlking
xmlking / golang.md
Last active August 9, 2024 04:25
Setup golang environment on MacOS without admin privileges

GoLang

Guide to setup golang development environment on MacOS without admin privileges

you you have local homebrew, install GoLang with brew install go and skip to Project step

for complete project with VSCode settings, refer hello project

@xmlking
xmlking / async-generator-example.ts
Created February 24, 2019 00:22
async generator example
// @ts-ignore
const fetch = require('node-fetch');
function delay(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
async function* getBooksPaged({ q, pageSize, lastPageIndex }) {
let currentIndex = 0;
let isDone = false;
@xmlking
xmlking / asciinema-svg-term.md
Last active September 8, 2018 20:23
How to screen record your terminal?

Guide to setup tools to record your terminal and share.

  1. Install asciinema
# install asciinema with
brew install asciinema
# start recording with:
asciinema rec
# to finish hit Ctrl-D or type exit.
# start recording to a file
@xmlking
xmlking / kubernetes.md
Last active November 12, 2022 11:56
Kubernetes Cheat Sheet

Kubernetes

Install

Prerequisites

  1. Bash v5+ checkout Upgrading Bash on macOS
  2. bash-completion@2

Install Docker and Kubernetes(k8s)

@xmlking
xmlking / README.md
Last active February 14, 2018 01:33

What

Implementation of tree data structure in TypeScript

Why

  1. How to search a node in Navigation menu tree?
  2. how to find all ancestors for a given node?
  3. Iterable interface for tree data structure

Usage

@xmlking
xmlking / Request.kt
Created January 2, 2018 04:15
Kotlin data class with second constructor !
@NoArg
@JsonIgnoreProperties(ignoreUnknown = true)
data class Request(
var AAA: String?,
var BBB : String?,
var CCC: String?
) {
constructor(raw: String): this(null,null, null) {
val mapper = jacksonObjectMapper()
val request = mapper.readValue<Request>(raw)
@xmlking
xmlking / docker-compose.yml
Last active March 24, 2023 01:12
cassandra healthcheck and dependency for docker compose
version: '2.1'
services:
cassandra:
image: cassandra:latest
networks:
- reactive-network
volumes:
- cassandra_data:/var/lib/cassandra
# - ${PWD}/data/cassandra/data:/var/lib/cassandra
@xmlking
xmlking / install-sdkman.sh
Created March 21, 2017 00:11
clean install sdkman
#!/usr/bin/env bash
set -e
rm -rf ~/.gvm
rm -rf ~/.sdkman
curl -s get.sdkman.io | bash
echo sdkman_auto_answer=true > ~/.sdkman/etc/config