Skip to content

Instantly share code, notes, and snippets.

@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 / alias.sh
Last active July 12, 2024 16:14
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 / 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 / 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 / css_resources.md
Last active September 20, 2015 21:32 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@saamalik
saamalik / javascript_resources.md
Last active September 20, 2015 21:32 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage