Skip to content

Instantly share code, notes, and snippets.

View kevinbowen777's full-sized avatar
🏠
Working on the edge of civilization

Kevin Bowen kevinbowen777

🏠
Working on the edge of civilization
View GitHub Profile
@kevinbowen777
kevinbowen777 / python_flake8_to_ruff_linting_migration.md
Created May 14, 2023 04:43
A guide for migrating Django projects using flake8 to ruff

Installing & configuring ruff

Summary:

The purpose of this document is to outline a migration guide for Django projects using poetry and nox to migrate from using flake8 to ruff for the purposes of linting the project.

created: 20230502

@kevinbowen777
kevinbowen777 / README.rst
Created January 19, 2023 02:14 — forked from dupuy/README.rst
Common markup for Markdown and reStructuredText

Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.

@kevinbowen777
kevinbowen777 / furacode.sh
Created September 25, 2022 16:38 — forked from m-rey/furacode.sh
Install Fura Code (Fira Code Nerd Font). Adapted from https://github.com/tonsky/FiraCode/wiki/Linux-instructions#manual-installation
#!/bin/bash
fonts_dir="${HOME}/.local/share/fonts"
if [ ! -d "${fonts_dir}" ]; then
echo "mkdir -p $fonts_dir"
mkdir -p "${fonts_dir}"
else
echo "Found fonts dir $fonts_dir"
fi
#
# .env template for django projects
#
#
# Remember to rename this file to .env
# and uncomment the appropriate CONFIG statements
# depending upon the deployment environment
# Documentation: https://github.com/sloria/environs#usage-with-django
# Installation: `pip install environs[django]`
@kevinbowen777
kevinbowen777 / git_quick_start.md
Last active May 5, 2022 19:38
Git Quick Start

See this StackOverflow answer for additional information.


# Pull base image                                        
FROM python:3.10                                         
                                                         
# Set environment variables                             
ENV PYTHONDONTWRITEBYTECODE 1                            
@kevinbowen777
kevinbowen777 / django_social_login_integration.md
Last active June 19, 2022 10:11
django-allauth social login integration
@kevinbowen777
kevinbowen777 / django_crispy_form_implementation.md
Created April 25, 2022 02:01
Django crispy forms implementation

Django crispy forms implementation - 20220424


  1. Install the package: poetry add django-crispy-forms OR pipenv install django-crispy-forms

  2. Add to INSTALLED_APPS:

@kevinbowen777
kevinbowen777 / install_django-bebug-toolbar.md
Last active April 24, 2022 05:51
Install django-debug-toolbar

Install django-debug-toolbar


  1. poetry add -D django-debug-toolbar OR pipenv install django-debug-toolbar --dev
@kevinbowen777
kevinbowen777 / git-pushing-multiple.rst
Created August 20, 2019 18:49 — forked from rvl/git-pushing-multiple.rst
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.

Pushing to Multiple Git Repos

If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.

Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.

If in doubt about what git is doing when you run these commands, just