Skip to content

Instantly share code, notes, and snippets.

View bartdorsey's full-sized avatar

Bart Dorsey bartdorsey

View GitHub Profile
@bartdorsey
bartdorsey / django-speed-run-part-1.md
Last active October 4, 2022 21:01
Django Speedrun Part 1

Django Speed run

In video gaming culture a speed run is where someone tries to play a video game all the way through as fast as they can. Turns out this is a great way to practice! So we are going to be setting up a basic django app from scratch as fast as we can.

We want to get to the point where we do the following as fast as possible.

  1. Create a project folder
@bartdorsey
bartdorsey / how-to-start-a-git-bases-project.md
Last active September 16, 2022 15:24
How to start a git based project

How to start a git-based project

If you already have a remote repository on gitlab or github

You will gather the "clone url" from the website and then use the following command.

git clone <clone url>
@bartdorsey
bartdorsey / notable-minecraft-seeds.md
Last active July 29, 2022 15:15
Notable Minecraft Seeds
Seed Variant Description
13032936 Bedrock lots of biomes all around, with a savannah village close by
-4643289498761436768 Bedrock Jungle with Portal and Cave near Spawn
@bartdorsey
bartdorsey / git-worktrees-how-to.md
Last active September 16, 2022 15:24
How I use git worktrees

How I use git worktrees

What are git worktrees?

Git worktrees are a special feature of git that lets you checkout branches/commits into a folder.

How is this different that plain 'ol git checkout?

You can check each branch out into a separate folder. This means no more stashing/un-stashing or committing just to work on several branches at once.

@bartdorsey
bartdorsey / common-django-pitfalls.md
Last active November 21, 2023 13:54
Common Django Pitfalls

Common Django Pitfalls

This contains a collection of common errors people make when coding Django apps, and how to fix them.

Important Strategies for preventing pitfalls

  1. Always do one thing at a time and test it. Make a single change, test it for errors, before moving on to the next thing.
  2. When trying to fix an error, only change one thing at a time, If the error message does not change, undo that change and try something else.
  3. If you discover you haven't saved a file, and that's causing an error, save the file and try again and pay attention to any new errors. The original error isn't worth worrying about until you have saved everything
@bartdorsey
bartdorsey / postgresql-tips.md
Last active September 16, 2022 15:24
PostgreSQL tips and tricks

PostgreSQL Tips and Tricks

Checking to see if PostgreSQL is running:

Running these commands should tell you if postgres is running or not.

Ubuntu Linux:

sudo service postgresql status
@bartdorsey
bartdorsey / maketree.md
Last active September 16, 2022 15:25
Make Tree

Make Tree

This problem was inspired by a Fun Fun Function video: https://www.youtube.com/watch?v=k7-N8R0-KY4

Write a recursive function makeTree(categories, parent) that takes an array of categories objects, each of which have an id property, and a parent property and returns a nested tree of those objects using the parent properties to construct the tree.

@bartdorsey
bartdorsey / vscode-extensions.md
Created September 29, 2020 22:38
VSCode Extentions I find to be valuable for JavaScript development
@mrabbitt
mrabbitt / get_keychain_pass.py
Created April 16, 2012 01:25
Command line access to the Mac OS X Keychain (based on post: http://blog.macromates.com/2006/keychain-access-from-shell/#comment-979)
#!/usr/bin/env python
import sys
import subprocess
import re
import logging
import argparse
# https://github.com/wooster/biplist (pip install biplist)
import biplist