Skip to content

Instantly share code, notes, and snippets.

View danielotieno's full-sized avatar
🇰🇪
Always Be Learning

Daniel Otieno danielotieno

🇰🇪
Always Be Learning
View GitHub Profile
@bradtraversy
bradtraversy / django_deploy.md
Last active March 3, 2025 00:58
Django Deployment - Digital Ocean

Django Deployment to Ubuntu 18.04

In this guide I will go through all the steps to create a VPS, secure it and deploy a Django application. This is a summarized document from this digital ocean doc

Any commands with "$" at the beginning run on your local machine and any "#" run when logged into the server

Create A Digital Ocean Droplet

Use this link and get $10 free. Just select the $5 plan unless this a production app.

@bradtraversy
bradtraversy / django_cheat_sheet.md
Last active March 4, 2025 17:01
Django command cheat sheet

Django 2.x Cheat Sheet

Creating a virtual environment

We need to create a virtual env for our app to run in: More Here Run this command in whatever folder you want to create your venv folder

python -m venv ./venv

Basic TDD Flow with rspec

To create a new project with rspec, begin from the the project's root directory and install the rspec gem:

gem install rspec

Create a folder in this root directory called spec where we will house all of your test files. cd into this folder and create a file called reverser_spec.rb. Let's write our first test:

@vratiu
vratiu / .bash_aliases
Last active March 2, 2025 00:14
Git shell coloring
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset