Skip to content

Instantly share code, notes, and snippets.

Chris Frewin princefishthrower

Block or report user

Report or block princefishthrower

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
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 Jan 29, 2019
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 varchar, 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.