Skip to content

Instantly share code, notes, and snippets.

View tkottke90's full-sized avatar

Thomas Kottke tkottke90

View GitHub Profile
@tkottke90
tkottke90 / file.util.js
Created March 12, 2021 01:36
Util Modules for Javascript
const fs = require('fs');
const { promisify } = require('util');
/**
* @typedef {Object} ReadJSONResponse
* @property {Boolean} error Did an error occur attempting to read the file or parse it to JSON
* @property {JSON} data Data contained in the file or an empty object if there was an error
* @property {string} message Details about the results send back. Will always be 'Success' for sucess and the message from the error if one occurred
*/
@tkottke90
tkottke90 / Suspension_Manager.cs
Last active October 23, 2020 02:56
SE Scripts
/*
* R e a d m e
* -----------
*
* In this file you can include any instructions or other comments you want to have injected onto the
* top of your final script. You can safely delete this file if you do not want any such comments.
*/
MyIni storageReader = new MyIni();
IEnumerator<bool> statemachine;
@tkottke90
tkottke90 / install.sh
Last active June 8, 2020 14:25
linux-box-setup
#!/bin/bash
# ==================
# Linux server setup script
# ==================
# Check if root
if [[ $(id -u) -ne 0 ]]; then
echo "Script must be run as root user!"
exit 1
import { TemplateResult } from 'lit-html';
import { BehaviorSubject } from 'rxjs';
interface iPageInput {
name: string;
tag: string,
}
interface Page extends iPageInput {
active: boolean
@tkottke90
tkottke90 / config.json
Last active February 25, 2020 22:09
QA Tester Config
{
"home": "/var/lib/qaform"
}
@tkottke90
tkottke90 / README.md
Last active February 20, 2020 03:27
Page.js intro

Page JS Intro Gist

Working intro file to using Page.js for single page routing

Requires

  • page.js
  • lit-html

Resources

@tkottke90
tkottke90 / processFunctions.js
Last active January 25, 2020 16:54
Async Generator used to process an array of functions
const http = require('http');
const functions = [
(context) => ({ ...context, name: "hello context" }),
(context) => {
return new Promise((resolve, reject) => {
const url = 'http://site.api.espn.com/apis/site/v2/sports/hockey/nhl/teams/30'
http.get(url, response => {
let output = '';
@tkottke90
tkottke90 / nginx.conf
Created January 16, 2020 03:58
SSL NGINX Config
upstream docker-web {
server ui;
}
upstream docker-api {
server api:3000;
}
server {
listen 80;
@tkottke90
tkottke90 / SSH_Notes.md
Last active March 7, 2020 14:16
SSH Notepad

SSH Notepad

A place for me to store information I have found useful while working with SSH

  • Github SSH Agent Instructions
    • This resource has information relating to connecting to Github over SSH as well as forwarding your Agent to a server
  • Use SSH to forward a port from a remote server to your local machine
    • ssh -L <localport>:localhost:<remote-port> <remote-hostname>
  • Example: ssh -L 3000:localhost:3000 tdkottke.com
@tkottke90
tkottke90 / .dockerignore
Last active January 16, 2020 20:15
Setup TS/Express Project
# Node Modules
node_modules/
# App Configs
./config/
# Logs
logs/
# Bundles