Skip to content

Instantly share code, notes, and snippets.

View CermakM's full-sized avatar
🧑‍💻
Engineering Manager @ STRV

Marek Čermák CermakM

🧑‍💻
Engineering Manager @ STRV
View GitHub Profile
@CermakM
CermakM / rbac-lookup.fish
Created October 9, 2019 13:23
Fish script to lookup kubernetes subjects based on RBAC
# Lookup kubernetes subjects based on RBAC
# Usage:
# rbac-lookup # to list all subjects to a rolebinding or clusterrolebinding
# rbac-lookup builder # list all {role,clusterrole}bindings where builder is a subject
function rbac-lookup
if test "$argv"
kubectl get rolebindings,clusterrolebindings \
--all-namespaces \
-o custom-columns=(string join0 'KIND:kind,NAMESPACE:metadata.namespace,NAME:metadata.name,SUBJECT:subjects[?(@.name=="'"$argv"'")].name') | grep -v '<none>'
@CermakM
CermakM / trello-sort-cards-by-age.js
Last active July 17, 2019 13:32
Sort trello cards by aging class
/**
* This is a Trello "plugin" for sorting cards by their age (using the Card Aging Trello Plugin).
*
* The Card Aging plugin has to be enabled.
* Usage:
* 1) Use with CJS extension
Chrome : https://chrome.google.com/webstore/detail/custom-javascript-for-web/ddbjnfjiigjmcpcpkmhogomapikjbjdk?hl=en
Firefox: https://addons.mozilla.org/en-US/firefox/addon/codeinjector/
* 2) Go to your Trello Board and include the following loading script in the extension.
*
@tomysmile
tomysmile / mac-setup-redis.md
Last active August 6, 2024 01:38
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis
# pdflatex options:
# -shell-escape is used by the minted package to call pygments
# -interaction=nonstopmode stops pdflatex waiting for user input on errors
pdflatex = pdflatex -shell-escape -interaction=nonstopmode report.tex
pdflatex_warn = $(pdflatex) | grep Warning | grep -v 'float' | sed "s/^LaTeX / /"
pdflatex_error = $(pdflatex) | grep -e "^!" | sed "s/^! / Error: /"
pdflatex_quiet = $(pdflatex) >/dev/null
# Other tools
texcount = texcount -merge -template="{1}" report.tex
@rxaviers
rxaviers / gist:7360908
Last active September 22, 2024 19:31
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: