Skip to content

Instantly share code, notes, and snippets.

@trastle
trastle / anyconnect-boot2docker.md
Last active November 27, 2015 23:25
Add routes to use Boot2Docker and AnyConnect at the same time on OSX.

Using boot2docker and AnyConnect at the same time

Boot2Docker works great, so does AnyConnect but running the two together causes traffic intended for Boot2Docker to head down the VPN link, this ruining everything.

Investigation

Tale a look at what network your Docker VirtualBox VM is on:

tastle@TASTLE ~ $ env | grep DOCKER_HOST
DOCKER_HOST=tcp://192.168.59.103:2376
@Fadhil
Fadhil / make-rake-talk.sh
Created February 7, 2015 09:17
Make your rake and rspec commands talk instead of sitting like a dumbass looking at the screen. Go grab some coffee!
##
# first run `brew install terminal-notifier`
# then save this file in your home directory
# and source it in your env file
# e.g if you're using zsh, you'd add this in your .zshrc:
# source $HOME/make-rake-talk.sh
#
# Restart your terminal and you no longer need to keep
# staring at the screen when you're doing long ass rake tasks
#
@joshdover
joshdover / README.md
Last active September 28, 2023 21:38
Idiomatic React Testing Patterns

Idiomatic React Testing Patterns

Testing React components seems simple at first. Then you need to test something that isn't a pure interaction and things seem to break down. These 4 patterns should help you write readable, flexible tests for the type of component you are testing.

Setup

I recommend doing all setup in the most functional way possible. If you can avoid it, don't set variables in a beforeEach. This will help ensure tests are isolated and make things a bit easier to reason about. I use a pattern that gives great defaults for each test example but allows every example to override props when needed:

@mayel
mayel / up
Last active January 2, 2022 01:11
up: script to keep your Mac up-to-date (both OS and Homebrew updates) via the command line
replaced by https://gist.github.com/mayel/c07bc0acb91824501d5bdbdc9eb7b33a