Skip to content

Instantly share code, notes, and snippets.

View snowch's full-sized avatar

Chris Snow snowch

View GitHub Profile
@snowch
snowch / tmux-sync.sh
Created December 9, 2020 14:13 — forked from kizzx2/tmux-sync.sh
Run multiple commands, and open them all in synchronized tmux panes
#!/bin/sh
#
# The MIT License (MIT)
#
# Copyright (c) 2013 Chris Yuen
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
{"level":"info","ts":1600529431.7823222,"logger":"kubedirector","msg":"KubeDirector Version: 0.5.0-unstable"}
{"level":"info","ts":1600529431.7824512,"logger":"kubedirector","msg":"Go Version: go1.13.7"}
{"level":"info","ts":1600529431.782459,"logger":"kubedirector","msg":"Go OS/Arch: linux/amd64"}
{"level":"info","ts":1600529431.7824628,"logger":"kubedirector","msg":"Version of operator-sdk: v0.15.2"}
{"level":"info","ts":1600529432.0865393,"logger":"controller-runtime.metrics","msg":"metrics server is starting to listen","addr":"0.0.0.0:8383"}
{"level":"info","ts":1600529432.0867908,"logger":"kubedirector","msg":"Registering Components."}
{"level":"info","ts":1600529432.0873418,"logger":"kubedirector","msg":"Waiting for client cache sync"}
{"level":"info","ts":1600529432.0874023,"logger":"kubedirector","msg":"Client cache sync successful"}
{"level":"info","ts":1600529432.106008,"logger":"kubedirector","msg":"Starting the Cmd."}
{"level":"info","ts":1600529432.106404,"logger":"controller-runtime.manager","ms
f().
ClientCertFromKubeconfig = "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM4akNDQWRxZ0F3SUJBZ0lJZkY0OFZJcTRFZmN3RFFZSktvWklodmNOQVFFTEJRQXdGVEVUTUJFR0ExVUUKQXhNS2EzVmlaWEp1WlhSbGN6QWVGdzB5TURBek1EVXhPREl6TVRGYUZ3MHlNVEF6TURVeE9ESXpNVFJhTURReApGekFWQmdOVkJBb1REbk41YzNSbGJUcHRZWE4wWlhKek1Sa3dGd1lEVlFRREV4QnJkV0psY201bGRHVnpMV0ZrCmJXbHVNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQXVJL1c1eTA0NEZPUWlwSlEKclovSjBINW50VmhwbkQ5cUZNaWg0L3kyQVdKMDNBd3NmbU1HbE81d3RnZUNwSGRFZFdzQ05yWDE2N3Y3RUtWVApxUU1MWFBmN1Njd0Z4R1VNUVdaZUZHMTJjc2wzMmxkbEdMc1FtM24vSk5EM1NlZVU5N0Q2cHhMTHRQK2J3UE1wClZkRm8zZG1ER1MwUEtEd3RWY0prdVZNbU1jMFRaY3ovWmN0YUVySVpxUTZqZHdTZWM2NzQ1VDJiOG1nS0JkZ0kKRjhnS2pFQnVCNEFRbzd3OXRuQjhnWjczZUdZb203Q215MGJaYzRRQnBqUWk2V1YzL2tDeExHbW5hSVZDOFRoOQo3VldsTTFZaDB1WDdUbTlrVndwQnZOYVd6UXllTlU5K0RnZmVsRHUzTGdEY2xQM3NZYTB3WWNHci9xUXVDRjVmCkN1QkxoUUlEQVFBQm95Y3dKVEFPQmdOVkhROEJBZjhFQkFNQ0JhQXdFd1lEVlIwbEJBd3dDZ1lJS3dZQkJRVUgKQXdJd0RRWUpLb1pJaHZjTkFRRUxCUUFEZ2dFQkFDZVBNV0toUERZeTlJQ3ByY2ErblRITFU3MjY5Y0MwNWc3agp
@snowch
snowch / .inputrc
Created June 22, 2020 14:01 — forked from johnlim/.inputrc
Set bash to use Vi-mode and remap <Esc> to jj
# want vi to be the default editor for readline
set editing-mode vi
# vi settings
$if mode=vi
# normal mode
set keymap vi-command
# insert mode
set keymap vi-insert
"jj": vi-movement-mode # remap escape
@snowch
snowch / check.sh
Created April 4, 2020 20:35
Check command exists or exit
## Check 1# ldapmodify installed or not
[[ -x $(command -v ldapmodify) ]] || { echo "Please Install Openldap-clients"; exit 1; };
@snowch
snowch / wireshark_over_ssh.sh
Last active May 16, 2020 21:49
tcpdump over ssh to wireshark
ssh user@remotehost tcpdump -i eth1 -U -s0 -w - 'not port 22' | sudo wireshark -k -i -
ssh user@remotehost tcpdump -i eth1 -U -s0 -w - 'not port 22' | sudo /Applications/Wireshark.app/Contents/MacOS/Wireshark -k -i -
@snowch
snowch / springer-free-maths-books.md
Created January 13, 2019 12:55 — forked from jnpaulson/springer-free-maths-books.md
Springer have made a bunch of books available for free, here are the direct links
@snowch
snowch / readme.md
Created November 8, 2017 09:28
python requests returning no data

Deploying Elixir and Phoenix applications using Docker and Exrm

Goal

By the end of this quick guide, you will know how to compile a Phoenix app release using Exrm and run it inside a Docker container. I've found only a couple of articles that discuss getting an Elixir app up and running inside a Docker container, and even those only touched on some parts of the process. The idea is that this guide will give you a full end-to-end example of how to get all the pieces and parts working together so that you are able to deploy your Phoenix application inside a Docker container.

Assumptions

  1. You already have a working Elixir environment with the Phoenix Framework installed
  2. You have at least basic working knowledge of Docker, and have installed the Docker tools onto your local environment
@snowch
snowch / GIF-Screencast-OSX.md
Created March 8, 2017 11:48 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: