Skip to content

Instantly share code, notes, and snippets.

@cphoover
cphoover / resume.json
Created June 7, 2021 07:08
My resume as a JSON file (see: https://jsonresume.org/)
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Charlie Hoover",
"label": "Full Stack Programmer preaching clean and intuitive UI-design.",
"image": "",
"email": "cphoover+jobs@gmail.com",
"phone": "(301) 922-6059",
"url": "https://registry.jsonresume.org/cphoover",
"summary": "JavaScript nerd and hacker. In years past I helped organize open source tech events. I have given speeches/lectures on various open source and JavaScript centered topics. \n\nMaryland boy born and raised, when I'm not coding I enjoy canoe camping along the potomac river. I love getting out in nature, cooking and food!"
@cphoover
cphoover / webpack.config.js
Created February 24, 2021 21:56
Configuration for non-working webpack bundle
/* eslint-disable */
const fs = require('fs');
const nodeExternals = require('webpack-node-externals');
const path = require('path');
const webpack = require('webpack');
const resolve = require('resolve');
const ManifestPlugin = require('webpack-manifest-plugin');
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
const ModuleNotFoundPlugin = require('react-dev-utils/ModuleNotFoundPlugin');
var locationURL = new URL('https://www.google.com/search?q=test')
var props = [];
for (var prop in locationURL) props.push(prop);
var locationObj = {};
props.forEach(prop => {
Object.defineProperty(locationObj, prop, {
get : () => locationURL[prop],
set : (val) => locationURL[prop] = val
const ClientOnly = ({ children }) => {
const [isVisible, setVisible] = useState(false);
useEffect(() => {
setVisible(true);
}, []);
return isVisible && children;
}
* Fix Unit Tests Webpack
* Incremental Build of Components using Delta of data.
* Optimization of build using caching
* Validate Bootstrapper Working with new Ejected Webpack Configuration
- Fix any issues that come up.
const benchmarksMap = {};
// benchmarks an individual fn
export const benchmarkFn = (id, fn) => {
// if id is not a string throw TypeError
if ("string" !== typeof id) throw new TypeError("id should be a string");
// if obj is not an object throw an error
if ("function" !== typeof fn) throw new TypeError("fn should be a function");
return (...args) => {
const haversine = require("haversine")
const moment = require('moment');
const twoMadridTripsWithinDayRange = [{
id: 'TEST-1234',
origAir: { // chicago
lat: 41.878114,
lon: -87.629798
},
destAir: { // madrid
var haversine = require("haversine")
const twoMadridTripsWithinDayRange = [{
id: 'TEST-1234',
origAir: { // chicago
lat: 41.878114,
lon: -87.629798
},
destAir: { // madrid
var haversine = require("haversine")
const twoMadridTripsWithinDayRange = [{
id: 'TEST-1234',
origAir: { // chicago
lat: 41.878114,
lon: -87.629798
},
destAir: { // madrid
var haversine = require("haversine")
const twoMadridTripsWithinDayRange = [{
id: 'TEST-1234',
origAir: { // chicago
lat: 41.878114,
lon: -87.629798
},
destAir: { // madrid