#Oh My Zsh - Git Cheat Sheet
g – git
gst – git status
gl – git pull
gup – git pull --rebase
| Replace all instances of `foo` with `bar` in project | |
| ``` | |
| :grep foo | |
| :cdo s/foo/bar/ | update | |
| ``` |
| kubectl exec -n airflow -it airflow-worker-0 /entrypoint.sh -- /bin/bash | |
| airflow backfill -s YYYY-MM-DD -e YYYY-MM-DD | |
| airflow backfill command doc: https://airflow.apache.org/docs/stable/cli-ref#backfill |
| #!/bin/sh | |
| fancy_echo() { | |
| local fmt="$1"; shift | |
| # shellcheck disable=SC2059 | |
| printf "\\n$fmt\\n" "$@" | |
| } | |
| append_to_zshrc() { |
| SELECT pg_terminate_backend(pg_stat_activity.pid) | |
| FROM pg_stat_activity | |
| WHERE pg_stat_activity.datname = 'TARGET_DB' | |
| AND pid <> pg_backend_pid(); |
| Delete evicted pods: kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod |
| Bee.transaction do | |
| CSV.foreach(Rails.root.join('tmp', 'shopper_grade.csv'), headers: true) do |line| | |
| email = line['Email'] | |
| grade = line['Corresponding Grade'] | |
| bee = User.find_by_email(email).bee | |
| bee.shopper_grade = grade | |
| bee.save! | |
| end | |
| end |
#Oh My Zsh - Git Cheat Sheet
g – git
gst – git status
gl – git pull
gup – git pull --rebase