Skip to content

Instantly share code, notes, and snippets.

View maxdevjs's full-sized avatar
💭
╯︵ ┻━┻

maxdevjs maxdevjs

💭
╯︵ ┻━┻
View GitHub Profile
@maxdevjs
maxdevjs / env-examples.md
Created October 30, 2022 03:25 — forked from ericelliott/env-examples.md
env-examples

Most configuration really isn't about the app -- it's about where the app runs, what keys it needs to communicate with third party API's, the db password and username, etc... They're just deployment details -- and there are lots of tools to help manage environment variables -- not the least handy being a simple .env file with all your settings. Simply source the appropriate env before you launch the app in the given env (you could make it part of a launch script, for instance).

env files look like this:

SOMEVAR="somevalue"
ANOTHERVAR="anothervalue"

To source it:

$ source dev.env # or staging.env, or production.env, depending on where you're deploying to

@maxdevjs
maxdevjs / tmux_panefocus.sh
Created June 26, 2025 02:23 — forked from rlychrisg/tmux_panefocus.sh
quickly cycle between last pane across all windows of a session. also add a little flash when changing focus to a new pane.
#!/bin/bash
## about
# this does two things 1) provides a visual indicator when moving between panes
# 2) cleverly cycles between the previous pane on all windows across the session.
# NOTE this script does echo out every single tmux focus switch to a file in /tmp/
# so unless you turn your machine off every night you'll want to find some way of
# dealing with that.