Skip to content

Instantly share code, notes, and snippets.

# Does it have a setup.py file?
This _may be_ sufficient.
1. Clone repo
2. Create a virtual environment; Activate virtual environment
3. pip install -e .
@paxcodes
paxcodes / dev_environment.md
Last active December 10, 2023 03:06
Setting up Dev Environment

Bash Aliases

Docker / Docker Compose

alias dkrcm="docker compose"
alias dkr=docker
# Apply docker autocompletion on `dkr` alias
source /usr/share/bash-completion/completions/docker
complete -F _docker docker docker.exe dockerd dockerd.exe dkr
@paxcodes
paxcodes / .gitconfig
Last active August 4, 2023 16:06
Git Aliases
[alias]
co = checkout
nb = checkout -b
b = branch
mg = merge
mgnf = merge --no-ff
amend = commit --amend
c = commit
@paxcodes
paxcodes / stash_dropped.md
Last active November 13, 2021 11:31 — forked from joseluisq/stash_dropped.md
How to recover a dropped stash in Git?

How to recover a dropped stash in Git?

1. Find the stash commits

git log --graph --oneline --decorate $( git fsck --no-reflog | awk '/dangling commit/ {print $3}' )

This will show you all the commits at the tips of your commit graph which are no longer referenced from any branch or tag – every lost commit, including every stash commit you’ve ever created, will be somewhere in that graph.

❓🐳 ⚙️ How to Debug Python App in VS Code

Context: Python app needs a database and our database is setup through Docker.


In VS Code docs,

  1. Add debugpy to your requirements.txt file:
@paxcodes
paxcodes / git_for_os.md
Last active May 7, 2021 02:09
git commands for contributing to open source projects

See Aliases for actual commands

Git Commands

Create your dev branch from an upstream branch and checkout

git co -b my_feat_or_bugfix upstream/main

Create branch of same name from remote branch and checkout

@paxcodes
paxcodes / python_workspace.md
Last active December 19, 2023 12:05
Configuring a Python Workspace (Ubuntu, VS Code)

🛠 Python Workspace in VS Code

Goals

To automatically

  • remove unused imports
  • order our imports alphabetically (isort)
  • detect basic security guidelines using Bandit
  • autoformat our code (line length, etc.)