Skip to content

Instantly share code, notes, and snippets.

@areese801
areese801 / git - Open git remote in a browser.md
Created February 19, 2024 17:53
Describes how to parse the results of `git remote -v` and open the corresponding repository in a browser window

Given that this command:

git remote -v

Shows output that looks like this:

origin	git@github.com:Organization/some-project.git (fetch)
@areese801
areese801 / dbt_about.sh
Last active September 30, 2025 14:02
This script will print the fully qualified table name (database.schema.table) for a given model (compiled against 'prod'), as well as immediate (i.e. One Degree Away) upstream and downstream models. Useful when dealing with complex dbt implementatio
#!/bin/bash
###
### This progam accepts a model name and tells us things about that model gleaned from the manifest.json file
###
##
# Define the docmd function
##
docmd () {
@areese801
areese801 / dbt_compile_and_link.sh
Last active September 30, 2025 14:02
This script will compile a dbt model against 'prod' and make a symlink to it before opening in Datagrip. I've found it to be very useful for development and debugging while using dbt core, especially when leveraged via an alias
@areese801
areese801 / stock.sh
Created February 3, 2022 17:11
Look up a stock ticker
#!/bin/bash
###
### Gets current price of a stock.
### See: https://hackernoon.com/you-can-track-stock-market-data-from-your-terminal-1k1h3135
###
tickerSymbol=${1}
@areese801
areese801 / find_pattern_in_files.sh
Last active September 30, 2025 14:03
A script to grep a pile of files for a regex pattern
#!/bin/bash
###
### Use this program to traverse some arbitrary path of files (nested) and grep for some pattern within them.
###
### Example usages:
### find_pattern_in_files.sh '/Users/areese/projects/' '[a-z]+'
### bash find_pattern_in_files.sh $(pwd) '(foo|bar)' #<-- Assumes that the path to this script is on your PATH variable.
###
### Note that the files to skip over are hard-coded into this program. Tune to your liking
@areese801
areese801 / make_package_dir_structure.sh
Last active December 11, 2021 22:26
A helper script to bootstrap an environment for python packaging as described here: https://packaging.python.org/tutorials/packaging-projects/
#!/bin/bash
###
### A script to create the basic directory structure needed for python packaging.
### You'll still have plenty of work to do, but this saves some manual steps.
###
### See: https://packaging.python.org/tutorials/packaging-projects/
###
#Example Usage:
@areese801
areese801 / make_env.sh
Last active September 30, 2025 14:03
make_env.sh - A script to easily bootstrap a python virtual environment
#!/bin/bash
## This program sets up a python virtual environment at a given path. It accepts and requires just a single parameter which is a fully
## qualified path to the parent folder in which the virtual environment should be created. Additionally, a requirements.txt file should
## exist in that path ahead of time. The virtual environment folder will be a 'peer' of requirements.txt
## Define the showHelp() function
showHelp(){
echo