Skip to content

Instantly share code, notes, and snippets.

View kurtkaiser's full-sized avatar

Kurt Kaiser kurtkaiser

  • Washington, DC
View GitHub Profile
@kurtkaiser
kurtkaiser / Code.gs
Created February 13, 2019 21:00
This code creates a sidebar in Google Apps Script, I wrote it as part of a tutorial video I filmed.
// Kurt Kaiser
// kurtkaiser.us
// Pretty Sidebar
// All rights reserved, 2019
function onOpen() {
var ui = SpreadsheetApp.getUi();
ui.createMenu('Tadah')
.addItem('Show Sidebar', 'showSidebar')
.addToUi();
@kurtkaiser
kurtkaiser / How to Save a Property Video
Created February 16, 2019 19:55
Properties in Google Apps Script is confusing. At least it was for me. I honestly spent a year avoiding using properties, I found saving variables as properties very frustrating. I use properties often and wanted to make a quick introduction to how properties in Apps Script work.
// Kurt Kaiser
// kurtkaiser.us
// All Rights Reserved, 2019
var scriptProperties = PropertiesService.getScriptProperties();
function onOpen(){
var ui = SpreadsheetApp.getUi();
var response = ui.prompt('What is your favorite color?', ui.ButtonSet.OK);
scriptProperties.setProperty('color', response.getResponseText());
ui.alert('Favorite color: ' + scriptProperties.getProperty('color'));
@kurtkaiser
kurtkaiser / Code.gs
Created March 17, 2019 20:21
Google Apps Script Email System with Full UI - Allows for multiple people to be alerted on a form submissions. The program has a full user interface, menu and a sidebar that save the options a user selects.
// UI Sheets Email Notifications
// Kurt Kaiser
// kurtkaiser.us
// All Rights Reserved, 2019
// Declare global variables
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getActiveSheet();
var lastRow = sheet.getLastRow();
var lastColumn = sheet.getLastColumn();
@kurtkaiser
kurtkaiser / findmedian.cpp
Last active April 8, 2019 22:33
Efficiently calculates and returns the median, as a double, of an array of integers
// Efficiently Calculates Median
// Kurt Kaiser
#include <iostream>
#include <algorithm>
using std::cout;
using std::endl;
// Defining a function to find the median of an array of ints,
// return type is double because median of ints can be decimals
double findMedian(int intArray[], int length) {
@kurtkaiser
kurtkaiser / assemblyAddition.asm
Created April 23, 2019 01:14
A simple addition program written in MASM, Assembly for x86 processors.
; Simple Calculator
; Kurt Kaiser
INCLUDE Irvine32.inc
; .data is used for declaring and defining variables
.data
num1 DWORD ?
num2 DWORD ?
codeTitle BYTE " --------- Math Magic --------- ", 0
directions BYTE "Enter 2 numbers.", 0
@kurtkaiser
kurtkaiser / subtractionAssembly.asm
Created April 23, 2019 01:35
Basic subtraction program, MASM, written for x86 processors
; Simple Calculator
; Kurt Kaiser
INCLUDE Irvine32.inc
; .data is used for declaring and defining variables
.data
codeTitle BYTE " --------- Math Magic --------- ", 0
directions BYTE "Enter 2 numbers.", 0
prompt1 BYTE "First number: ", 0
@kurtkaiser
kurtkaiser / multiplicationCalc.asm
Created April 24, 2019 01:37
Simple multiplication calculation written in MASM Assembly language for the x86 processor.
; Simple Multiplication Calculator
; Kurt Kaiser
INCLUDE Irvine32.inc
; .data is used for declaring and defining variables
.data
codeTitle BYTE " --------- Math Multiplication Magic --------- ", 0
directions BYTE "Enter 2 numbers.", 0
prompt1 BYTE "First number: ", 0
@kurtkaiser
kurtkaiser / divisionCalculator.asm
Created April 24, 2019 01:55
Simple division calculator written in MASM Assembly language for the x86 processors
; Simple Division Calculator
; Kurt Kaiser
INCLUDE Irvine32.inc
; .data is used for declaring and defining variables
.data
codeTitle BYTE " --------- Math Magic --------- ", 0
directions BYTE "Enter 2 numbers.", 0
prompt1 BYTE "First number: ", 0
@kurtkaiser
kurtkaiser / DoorToLevel1Script.cs
Created July 2, 2020 19:24
Dungeon Crawl RPG - game made for a video tutorial
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DoorToLevel1Script : MonoBehaviour
{
public GameManager gameManager;
private void OnTriggerEnter2D(Collider2D collision)
{
if (collision.gameObject.CompareTag("Player"))
@kurtkaiser
kurtkaiser / DungeonGameManager.cs
Created July 2, 2020 19:26
Dungeon Crawl RPG - game made for a video tutorial
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class GameManager : MonoBehaviour
{
public GameObject[] spawners;
private int level = 0;
private int currentScene = 0;