Skip to content

Instantly share code, notes, and snippets.

View radditude's full-sized avatar

CJ Horton radditude

View GitHub Profile
@radditude
radditude / start
Created April 13, 2018 01:10
Tmux start-up script for multiple server processes
#! /bin/zsh
# $PROJECTDIR is set in .zshrc/bash_profile
FIRSTDIR="$PROJECTDIR/first"
SECONDDIR="$PROJECTDIR/second"
# starts a tmux session using iTerm's tmux mode
# opens a new tab for each service and ensures that the name won't get overridden
# runs the servers/queues/processes for each service
# sends the command but doesn't run it for services I don't need all the time

Keybase proof

I hereby claim:

  • I am radditude on github.
  • I am radditude (https://keybase.io/radditude) on keybase.
  • I have a public key ASBpbDm2qNI_Z0bt-aKpkozD1VXL5WtQ775FJIFOnO_mBgo

To claim this, I am signing this object:

@radditude
radditude / slackdarkmode.sh
Last active August 14, 2019 19:43
slackdarkmode.sh
#!/usr/bin/env bash -e
# GET THE SCRIPT:
# curl https://gist.githubusercontent.com/radditude/43b76745b796db8035d676ff63346d4a/raw/5151905200d894dd4bbf9946d9f3944cfc2db621/slackdarkmode.sh > ~/slackdarkmode.sh
# chmod +x ~/slackdarkmode.sh
#
# SEE OPTIONS:
# ~/slackdarkmode.sh usage
usage() {
@radditude
radditude / airtable.sh
Created January 18, 2019 06:00
script to generate prefilled urls for Airtable forms with fuzzy matching
# example usage: ./airtable.sh mon edu 2 int "learning how to write bash scripts"
fuzz(){
echo "$2" | grep -q "$1"
}
fuzzyfind(){
# PROJECTS
if fuzz $1 content; then echo "Content"
elif fuzz $1 education; then echo "Education"
@radditude
radditude / git-commit-with.sh
Last active February 15, 2019 01:20
Bash helper for committing with a co-author when pairing, with fuzzy matching for names
# usage: git-commit-with jane "adding the thing" --amend
match(){
echo "$2" | grep -q "$1"
}
commit-info () {
if match $1 john; then echo "John Smith <jsmith@fakeemail.test>"
elif match $1 jane; then echo "Jane Doe <janedoe@fakeemail.test>"
else