Skip to content

Instantly share code, notes, and snippets.

@jdbit
jdbit / config
Created June 3, 2019 12:04
i3 config
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
@jdbit
jdbit / vimrc
Last active November 10, 2022 09:18
My vim config
"set nocompatible " be iMproved, Vundle required
filetype off " Vundle required
syntax on
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
@jdbit
jdbit / views.py
Last active August 12, 2020 08:52
Useful Django functions
# CRUD
@login_required(login_url='home')
def create_page(requrest):
"""
Create form for model
"""
template = "post.html"
form = PostForm()
if request.method == 'POST':
@jdbit
jdbit / .bash_aliases
Last active August 20, 2020 14:19
Bash aliases for Django
alias venv='source env/bin/activate'
alias mm='./manage.py makemigrations'
alias mi='./manage.py migrate'
alias cs='./manage.py collectstatic --no-input'
alias rs='./manage.py runserver'
@jdbit
jdbit / delete_migrations.sh
Last active August 27, 2021 17:09
Delete all Django migrations in the project
find . -path "*/migrations/*.py" -not -name "__init__.py" -delete -not -path "*/env/*" -delete && find . -path "*/migrations/*.pyc" -delete -not -path "*/env/* -delete"