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
@joshlarsen
joshlarsen / organize-imports.luau
Created October 22, 2025 19:20 — forked from nightcycle/organize-imports.luau
I wrote this because Synty Studios uses texture maps for their assets, but it's more convenient to recolor the mesh directly in Roblox Studio. This splits it into multiple OBJ based on the color the UV points to.
--!strict
-- Run this in command line after you import the meshes
-- Services
-- Packages
-- Modules
-- Types
-- Constants
local SEPARATION = 1
local MAX_X_OFFSET = 50
-- Variables