Skip to content

Instantly share code, notes, and snippets.

View kurtisdunn's full-sized avatar

Kurtis Dunn kurtisdunn

View GitHub Profile
@kurtisdunn
kurtisdunn / dell1500.md
Last active July 11, 2019 05:42
Dell 1500 Series console commands

Dell 1500 Series console commands

console> enable

console# delete startup-config

console# releoad
@kurtisdunn
kurtisdunn / mariadbinstall.md
Last active February 18, 2022 23:52
Install MariaDB on AWS Linux

Install MariaDB on AWS Linux

Create the MariaDB yum repository for v10.3

sudo vi /etc/yum.repos.d/MariaDB.repo

And paste in the following:

@kurtisdunn
kurtisdunn / fetch.md
Created January 7, 2019 01:48
Simple client side GraphQL query with vars

Simple client side GraphQL query with vars

var dice = 3;
var sides = 6;
var query = `query RollDice($dice: Int!, $sides: Int) {
  rollDice(numDice: $dice, numSides: $sides)
}`;

fetch('/graphql', {
@kurtisdunn
kurtisdunn / docker.md
Created November 25, 2018 03:14
Docker Cheatsheet

Docker Cheat Sheet

Check running processes

docker ps -a

Delete all unused docker containers

 docker system prune
@kurtisdunn
kurtisdunn / dotnetdockerapi.md
Last active November 25, 2018 03:52
Fullstack API using .NET & SQLServer for MacOS

Fullstack API using .NET & SQLServer for MacOS

Running this stack up on MacOS 10.14.0

Prerequisites

  • Docker
  • Dotnet

To download the latest SQL Server image, run the following Docker command from Terminal:

@kurtisdunn
kurtisdunn / sqlserver.md
Last active November 28, 2018 04:28
SQLServer 2016.

SQLServer 2016

A few CRUD operations and SQL statements for SQL Server 2016.

#Drop DB

USE master ; 
@kurtisdunn
kurtisdunn / desc.md
Last active August 26, 2018 05:01
Scroll To Function JS

Scroll To Top - Vanilla Javacript

@kurtisdunn
kurtisdunn / desc.md
Last active August 26, 2018 04:12
React Form Component

React Form Component

Forms need to be able to pass state to deeply nested children, specifically validation state. You will need map React.Children in order to setState for each child. Unfortunately this doesn't solve the problem of of deeply nested inputs. In order to combat this we will need to use a recursive function to check against each nested level to see if it has an input for validation.

  function recursiveCloneChildren(children) {
    const that = this;
    return React.Children.map(children, child => {
 var childProps = {};
@kurtisdunn
kurtisdunn / active_directory.md
Last active May 2, 2019 23:20
active_directory.ps
  
#Set the ExecutionPolicy to allow execution of scripts

Set-ExecutionPolicy Unrestricted


#Connect to your Domain Controller(DC)
#Change the value after the -ComputerName to your know DC
@kurtisdunn
kurtisdunn / classes.js
Created February 8, 2016 05:12
Pure JS ClassList manipulation
Element.prototype.hasClass = function (className) {
return new RegExp(' ' + className + ' ').test(' ' + this.className + ' ');
};
Element.prototype.addClass = function (className) {
if (!this.hasClass(className)) {
this.className += ' ' + className;
}
return this;
};