Skip to content

Instantly share code, notes, and snippets.

View upkarlidder's full-sized avatar
:octocat:
hiya!

Upkar Lidder upkarlidder

:octocat:
hiya!
View GitHub Profile
@upkarlidder
upkarlidder / Vagrant + MicroK8S - README.md
Created March 16, 2022 00:04 — forked from JonTheNiceGuy/Vagrant + MicroK8S - README.md
Using Vagrant with MicroK8S to experiment with Kubernetes
@upkarlidder
upkarlidder / agnoster-pyenv
Created April 9, 2019 22:35 — forked from loganasherjones/agnoster-pyenv
Display pyenv environment on agnoster prompt
# vim:ft=zsh ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
# Make sure you have a recent version: the code points that Powerline
# I put them in my shell profile
# I use zsh so it's in ~/.zshrc
# for bash, it might be in ~/.bash_profile
alias k='kubectl'
alias ka='kubectl apply -f'
alias kex='kubectl exec -ti'
alias kl='kubectl logs'
alias kg='kubectl get'
alias kgp='kubectl get pods'
@upkarlidder
upkarlidder / forkMyself.md
Created June 30, 2017 17:44 — forked from ericoporto/forkMyself.md
How to fork my own github repository.
  1. create a new repository in Github, don't add a readme or anything.

  2. clone it on your computer

  3. add the original repository (the one you want to fork) as upstream source.

    git remote add upstream [url]

  4. fetch and merge upstream.

@upkarlidder
upkarlidder / js-tricky-bits.md
Created March 3, 2017 22:44 — forked from amysimmons/js-tricky-bits.md
Understanding closures, callbacks and promises in JavaScript

#Understanding closures, callbacks and promises

For a code newbie like myself, callbacks, closures and promises are scary JavaScript concepts.

10 months into my full-time dev career, and I would struggle to explain these words to a peer.

So I decided it was time to face my fears, and try to get my head around each concept.

Here are the notes from my initial reading. I'll continue to refine them as my understanding improves.

@upkarlidder
upkarlidder / quesadilla.bash
Created February 23, 2017 19:27 — forked from captainsafia/quesadilla.bash
When the user has changed into a git directory, rebase with upstream if there are no uncommitted files.
function cd {
# Run the system CD command on the parameters that were passed in
builtin cd "$@"
# Check if the directory we are in now is a git directory
if [ -d ".git" ]; then
# If so, check to see that there are no uncommitted files
if [ $(git status --porcelain 2>/dev/null| egrep "^(M| M)" | wc -l) ]; then
# Rebase our current branch with upstream/master
git fetch upstream && git rebase upstream/master
fi