Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
💻 🤓 💻

Chris Frewin princefishthrower

💭
💻 🤓 💻
View GitHub Profile
View Ubuntu-16.04-Python-3.7-Django-3.0.4-DockerFile
FROM ubuntu:16.04
# Ubuntu 16.04 ships with Python 3.5 as default. We should install and use python 3.7 to use the newest Django version (3.0.4 as of March 2020)
# We also need the python3.7-dev package in order for mod_wsgi-standalone to read the headers which are specific to 3.7.7
RUN apt install -y software-properties-common
RUN add-apt-repository -y ppa:deadsnakes/ppa
RUN apt update
RUN apt install -y python3.7
RUN apt install -y python3.7-dev
# Update the simlink of our 'python3' command
View express-static-serve-build-folder.js
'use strict';
const http = require('http');
const express = require('express');
const path = require('path');
const app = express();
let server;
app.use('/', express.static('./build'));
@princefishthrower
princefishthrower / iso_codes.json
Last active Aug 27, 2018
Two Letter ISO to Three Letter ISO Country Codes JSON
View iso_codes.json
[
{
"Country": "Afghanistan",
"iso_alpha_2": "AF",
"iso_alpha_3": "AFG",
"iso_un_m49": "004"
},
{
"Country": "Aland Islands",
"iso_alpha_2": "AX",
View sandp500.json
{
"companies": [{
"symbol": "MMM",
"name": "3M Company"
}, {
"symbol": "ABT",
"name": "Abbott Laboratories"
}, {
"symbol": "ABBV",
"name": "AbbVie Inc."
@princefishthrower
princefishthrower / create_database_commands_simple.txt
Last active Apr 3, 2020
Create role, create database, grant privledges on database, connect to database, create table, grant privledges to that table command line
View create_database_commands_simple.txt
***Issue the following commands in the terminal after logging in with 'psql'
***If you copy paste, note that the new user will be 'new_user' with password 'mysupercoolpassword'
***with database 'new_database' and table 'new_table':
CREATE ROLE new_user WITH LOGIN PASSWORD 'mysupercoolpassword';
CREATE DATABASE new_database;
GRANT ALL PRIVILEGES ON DATABASE new_database TO new_user;
\connect new_database;
CREATE TABLE new_table(id int, some_string varchar, cool_big_int bigint, PRIMARY KEY (id));
GRANT ALL PRIVILEGES ON TABLE new_table TO new_user;
You can’t perform that action at this time.