Skip to content

Instantly share code, notes, and snippets.

@joshlarsen
joshlarsen / redis
Created October 13, 2021 20:05
Rails binstubs
#!/bin/bash
#
# Make sure to stop/start the Redis Docker container properly.
#
CONTAINER_NAME="redis-container"
DOCKER_START="docker start -ai ${CONTAINER_NAME}"
DOCKER_RUN="docker run --name ${CONTAINER_NAME} -p 6379:6379 redis"
# is there an existing container named 'redis'?
@joshlarsen
joshlarsen / ssh.sh
Created June 14, 2022 01:22
gcloud ssh port forwarding
gcloud compute ssh --ssh-flag="-L 5555:localhost:5432" "instance-1"
@joshlarsen
joshlarsen / tmux.conf
Last active July 4, 2022 16:03
tmux config
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# color terminal
set -g default-terminal "xterm-256color"
# Disable mouse mode