Skip to content

Instantly share code, notes, and snippets.

View james-fourth's full-sized avatar
🎯
Focusing

James Joseph Potts IV james-fourth

🎯
Focusing
View GitHub Profile
@james-fourth
james-fourth / dedupe.js
Last active February 12, 2020 00:52
Remove duplicates from a string
const dedupe = (string) => {
const parsed = string.split('')
let deduplicate = [];
parsed.map(function(value) {
if (!deduplicate.includes(value)) {
deduplicate.push(value);
}
})
@james-fourth
james-fourth / s3_addToBucket.js
Created December 14, 2019 21:33
AWS-SDK S3 upload
// Load the AWS SDK, fs and path modules for Node.js
import AWS from "aws-sdk";
import fs from "fs";
import path from "path";
// Set the region
AWS.config.update({region: "us-west-1"})
// Create S3 service object
const s3 = new AWS.S3({apiVersion: "2006-03-01"});
@james-fourth
james-fourth / App infra
Created October 31, 2019 00:10
Affirm Technical Screen
const express = require("express");
const bodyParser = require("body-parser")
const ejs = require("ejs");
const app = express();
app.set("view engine", "ejs");
app.use(bodyParser.urlencoded({extended: true}));
app.get("/", function(req, res) {