Skip to content

Instantly share code, notes, and snippets.

View jrnxf's full-sized avatar
🌱

Colby Thomas jrnxf

🌱
View GitHub Profile
@terinjokes
terinjokes / klogs.zsh
Last active February 26, 2023 23:20
FZF function for Kubernetes logs (including previewing)
klogs() {
pod="$(kubectl get po -o wide|tail -n+2|fzf -n1 --reverse --tac --preview='kubectl logs --tail=20 --all-containers=true {1}' --preview-window=down:50%:hidden --bind=ctrl-p:toggle-preview --header="^P: Preview Logs"|awk '{print $1}')"
if [[ -n $pod ]]; then
kubectl logs --all-containers=true $pod
fi
}
@tanaikech
tanaikech / submit.md
Last active May 7, 2024 07:51
Transposing Slice From (n x m) To (m x n) for golang

Transposing Slice From (n x m) To (m x n) for golang

This is a sample script for transposing slice from (n x m) to (m x n) for golang.

Script :

package main

import "fmt"

func transpose(slice [][]string) [][]string {
@leonardofed
leonardofed / README.md
Last active May 3, 2025 05:23
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@noahlt
noahlt / code.sh
Created October 23, 2011 07:19
How do I kill whatever process is listening to a particular port?
function killport {
if [ $1 == '-h' ] || [ -z $1 ]; then
echo '`killport <PORT>` finds the process listening to the specified port and kills it.'
else
process_line=`sudo lsof -i :$1 | tail -1`
if [ "$process_line" == "" ]; then
echo "no processes listening on $1"
else
process_name=`echo "$process_line" | awk '{print $1}'`
echo "killing $process_name"