Skip to content

Instantly share code, notes, and snippets.

💭
Always Coding :)

Brad Traversy bradtraversy

💭
Always Coding :)
Block or report user

Report or block bradtraversy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bradtraversy
bradtraversy / scrapy.md
Last active Feb 6, 2020
Scrapy commands and code
View scrapy.md
@bradtraversy
bradtraversy / flutter_setup.md
Last active Feb 13, 2020
Flutter dev setup & notes
View flutter_setup.md
@bradtraversy
bradtraversy / devcamper_specs.md
Last active Feb 4, 2020
Specs for Devcamper Udemy course project
View devcamper_specs.md

DevCamper Backend API Specifications

Create the backend for a bootcamp directory website. The frontend/UI will be created by another team (future course). The html/css template has been created and can be used as a reference for functionality. All of the functionality below needs to be fully implmented in this project.

Bootcamps

  • List all bootcamps in the database
    • Pagination
    • Select specific fields in result
    • Limit number of results
    • Filter by fields
@bradtraversy
bradtraversy / node_nginx_ssl.md
Last active Feb 16, 2020
Node app deploy with nginx & SSL
View node_nginx_ssl.md

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@bradtraversy
bradtraversy / django_crash_course.MD
Last active Feb 17, 2020
Commands for Django 2.x Crash Course
View django_crash_course.MD

Django Crash Course Commands

# Install pipenv
pip install pipenv
# Create Venv
pipenv shell
View node_redis_cache.js
const express = require('express');
const fetch = require('node-fetch');
const redis = require('redis');
const PORT = process.env.PORT || 5000;
const REDIS_PORT = process.env.PORT || 6379;
const client = redis.createClient(REDIS_PORT);
const app = express();
@bradtraversy
bradtraversy / node_redis_cache.js
Created Aug 20, 2019
Node.js & Redix Caching
View node_redis_cache.js
const express = require('express');
const fetch = require('node-fetch');
const redis = require('redis');
const PORT = process.env.PORT || 5000;
const REDIS_PORT = process.env.REDIS_PORT || 6379;
const client = redis.createClient(REDIS_PORT);
const app = express();
@bradtraversy
bradtraversy / python_heroku.MD
Created Aug 16, 2019
Python & Postgres Heroku Deployment
View python_heroku.MD

Python Heroku Deployment

Steps to create a postgres database and deply a Python app to Heroku

Install guinicorn locally

pipenv install gunicorn
or
pip install gunicorn
@bradtraversy
bradtraversy / eslint_prettier_airbnb.md
Created Jul 19, 2019
ESLint, Prettier & Airbnb Setup
View eslint_prettier_airbnb.md

VSCode - ESLint, Prettier & Airbnb Setup

1. Install ESLint & Prettier extensions for VSCode

Optional - Set format on save and any global prettier options

2. Install Packages

npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
View mongodb_cheat_sheet.md

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

You can’t perform that action at this time.