Skip to content

Instantly share code, notes, and snippets.

View devoNOTbevo's full-sized avatar

Devon Mobley devoNOTbevo

View GitHub Profile
@devoNOTbevo
devoNOTbevo / me_eating_tacos.ts
Created February 25, 2023 14:11
Object Oriented Tacos
// Top Level Classes
class Person {}
class Devon extends Person {
public hungry = true;
eat(food: Food | Food[]) {
// nom nom nom
}
apply(food: Food, sauce: Sauce) {
// put the sauce on the food
@devoNOTbevo
devoNOTbevo / node_mysql_exporter.ts
Created January 4, 2023 15:31
A beginner friendly
const mysql = require('mysql');
const fs = require('graceful-fs');
// Make any queries constant for readability
const TABLES_QUERY =
"SELECT table_name FROM information_schema.tables WHERE table_schema ='my_table_schema";
const COLUMNS_QUERY = 'SELECT column_name from information_schema.columns';
// Create the MySQL connection
const connection = mysql.createConnection({
const { exec } = require('child_process');
const { writeFileSync } = require('fs');
const environment = process.env.ENVIRONMENT || 'development';
// test environment configuration
const configuration = {
development: {
common: {
base_url: 'http://localhost:5001/api/v1',
},
@devoNOTbevo
devoNOTbevo / select-element.tsx
Last active September 13, 2022 06:23
SelectElement: A sample React Component that has a button that initiates actions to hover over and element and drop a pin on that element. While "dropping", elements are outlined to show visibility. It then opens a modal to initiate a workflow from there.
import { ToastContainer, toast } from 'react-toastify';
import Modal from 'react-modal';
import { useEffect, useState } from 'react';
import useScreenshot from '../../hooks/screenshot-hook';
import useWishes from '../../hooks/wishes-hook';
import { MAP_MARKER_URL } from '../../config/constants';
import 'react-toastify/dist/ReactToastify.min.css';
Modal.setAppElement(document.body);