Skip to content

Instantly share code, notes, and snippets.

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

Manoj Prasanna Handapagnoda hmdmph

🏠
Working from home
  • Cipher Solutions Pvt Ltd
  • Sri Lanka
View GitHub Profile
@hmdmph
hmdmph / git_aws_k8s_bash_prompt.sh
Last active February 1, 2022 11:42 — forked from woods/git_svn_bash_prompt.sh
Set color bash prompt according to git/svn branch, and return status of last command.
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to: (well there is k9s, but this is highly customizable as you wish; like I did :D)
# * current AWS profile configured (really helpful if you are switching AWS accounts frequently)
# * current context of Kubernetes(K8S) cluster ( also helpful to see which cluster you are working on
# * the active virtualenv
# * the branch/status of the current git repository
# * the return value of the previous command
@hmdmph
hmdmph / go_port_forwarding.go
Created November 28, 2021 13:31 — forked from qhwa/go_port_forwarding.go
network port forwarding in go lang
package main
import (
"fmt"
"io"
"net"
)
func main() {
ln, err := net.Listen("tcp", ":8080")