Please follow these principles when generating or modifying code:
- Apply SOLID Principles
Write modular, maintainable code following:- Single Responsibility
- Open/Closed
- Liskov Substitution
| # Save me here -> ~/.oh-my-zsh/themes/pairing.zsh-theme | |
| # Git Authors | |
| prompt_git_name() { | |
| if $(git config --get duet.env.git-author-name >/dev/null 2>&1); then | |
| prompt_git_duet_name | |
| else | |
| prompt_git_normal_name | |
| fi | |
| } |
| class ResetAllMocksInContextExtension : BeforeEachCallback { | |
| override fun beforeEach(context: ExtensionContext?) { | |
| val testInstance = context!!.testInstance.get() | |
| val testContext = getAccessibleContext(testInstance) | |
| resetMocksInContext(testContext) | |
| } | |
| private fun getAccessibleContext(testInstance: Any): Any? { |
| # If you come from bash you might have to change your $PATH. | |
| # export PATH=$HOME/bin:/usr/local/bin:$PATH | |
| # Path to your oh-my-zsh installation. | |
| export ZSH="/Users/pivotal/.oh-my-zsh" | |
| # Set name of the theme to load --- if set to "random", it will | |
| # load a random theme each time oh-my-zsh is loaded, in which case, | |
| # to know which specific one was loaded, run: echo $RANDOM_THEME | |
| # See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes |
| uuid () { | |
| UUID=$(uuidgen) && echo $UUID | pbcopy && echo $UUID | |
| } |
| BLUE="$(tput setaf 4)" | |
| GREEN="$(tput setaf 2)" | |
| ORANGE="$(tput setaf 3)" | |
| RED="$(tput setaf 1)" | |
| RESET="$(tput sgr0)" | |
| git_prompt(){ | |
| if [ -d .git ]; then | |
| IS_GIT_REPO=true | |
| else |
| #!/usr/bin/env bash | |
| # This script temporarily adds an ssh key until the end of the working day, from Lastpass. | |
| # Requires the lastpass cli, if you don't have it, install with `brew install lastpass-cli --with-pinentry` | |
| # Store rsa_id in a note in lastpass called 'rsa_id' in a folder called 'Github'. | |
| # | |
| # Usage: | |
| # add_key [hours] | |
| # | |
| # hours Specifies the number of hours to add the ssh key. Overrides the default end of day behavior. |
| #!/usr/bin/env ruby | |
| require "redis" | |
| require "securerandom" | |
| if ARGV.length != 4 | |
| puts "redis-filler.rb password url port mb" | |
| exit 1 | |
| end |
#StrangeLoop2016 all videos
Fixing bugs have diminishing returns. There is a one time cost, barrier to entry, to fixing bugs in dependencies. How do you make it easier to read and understand your dependencies?
Docs are perpetually out of date, source code is never out of date for describing what it does.