Skip to content

Instantly share code, notes, and snippets.

@saamalik
saamalik / alias.sh
Last active April 18, 2024 08:57
Speedy K8s switching with kctx & klctx
# add to your shell startup script (e.g: $HOME/.bashrc).
# install [fzf](https://github.com/junegunn/fzf)
# e.g: brew install fzf
kctx() {
(
cd ~/.kube/ || exit 1
# shellcheck disable=SC2012
KUBE=$(ls kube-* | fzf)
[[ -n "$KUBE" ]] && ln -sf "$KUBE" config
@saamalik
saamalik / controllerconfig.yaml
Created April 10, 2022 07:50
Crossplane examples
# add debugging
# and fix for bug
apiVersion: pkg.crossplane.io/v1alpha1
kind: ControllerConfig
metadata:
name: jet-aws-config
spec:
args: ['-d']
env:
- name: AWS_REGION
@saamalik
saamalik / spectro-debug.yaml
Last active November 6, 2020 21:19
Spectro Debug
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: spectro-debug
name: spectro-debug
namespace: kube-system
spec:
replicas: 1
selector:
@saamalik
saamalik / tmux.md
Created September 28, 2019 23:38 — forked from russelldb/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@saamalik
saamalik / tmux-client-3239.log
Created June 2, 2013 00:58
Tmux lost server crash when sending mouse cursor escape sequence
got 8 from server
@saamalik
saamalik / Pro.terminal
Last active September 16, 2017 12:54
MacOX
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIMagentaColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECcw
LjgxMDcyMjgzMjIgMC4zMDQ5NDg5MTUzIDAuNzk2NTYxODY2NgAQAYAC0hAREhNaJGNs
YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohIUWE5TT2JqZWN0XxAPTlNLZXllZEFyY2hp
@saamalik
saamalik / ExampleSpec.scala
Created November 20, 2016 21:27
ReactiveMongo 0.12 + ScalaTest WordSpec
import org.scalatest.{AsyncWordSpec, Matchers}
import play.api.libs.json._
import reactivemongo.api.{Cursor, MongoDriver, ReadPreference}
import reactivemongo.play.json._
import reactivemongo.play.json.collection.JSONCollection
import scala.concurrent.Future
class ExampleSpec extends AsyncWordSpec with Matchers {
@saamalik
saamalik / gist:f91f9fc9d2ebcb90bffc73cf7d08ffce
Created November 20, 2016 21:25
Scalatest WordSpec with ReactiveMongo 2.5
sdfsdfsdfsf
@saamalik
saamalik / .tmux.conf
Last active April 12, 2016 16:06
My Tmux configuration
# Setting the prefix from C-b to C-a
set -g prefix C-a
# Free the original Ctrl-b prefix keybinding
unbind C-b
#setting the delay between prefix and command
set -s escape-time 4
# Rest the cursor back to input mode