Skip to content

Instantly share code, notes, and snippets.

View dengsauve's full-sized avatar
:octocat:
How much firepower is necessary to imbed a cherry in an acoustic ceiling tile?

Dennis Sauve dengsauve

:octocat:
How much firepower is necessary to imbed a cherry in an acoustic ceiling tile?
View GitHub Profile
@dengsauve
dengsauve / uses.md
Created July 24, 2023 02:25
A list of tools I use for development work

(Dennis) Uses

Hardware

Work

  • Surface Laptop 4 w/Microsoft Dock
  • Dell 43" 16:9 4K monitor
  • Das Keyboard 4 (numpad and mx cherry blue switches)
  • Logitech M510
@dengsauve
dengsauve / rando.kt
Last active April 27, 2023 07:03
saveRic'sButt
import kotlin.random.Random
/************************************************************
* Name: Eric Gooler
* Date: 4/26/2023
* Assignment:
* Class Number: CIS282
* Description:
************************************************************/
fun main() {
var numbers = List(200) { Random.nextInt(1, 101) }
@dengsauve
dengsauve / FindDesktopBG.ps
Created September 22, 2022 18:11
Find and Change Your Assigned Desktop Background
# 1. Find and decode where your assigned desktop background is located
$TIC=(Get-ItemProperty 'HKCU:\Control Panel\Desktop' TranscodedImageCache -ErrorAction Stop).TranscodedImageCache
[System.Text.Encoding]::Unicode.GetString($TIC) -replace '(.+)([A-Z]:[0-9a-zA-Z\\])+','$2'
# 2. Open the file location in Explorer
# 3. Copy the image you wish to have as your BG into that directory
# 4. Copy the name of the assigned desktop background, then rename it to something like justInCase.jpg
# 5. Rename the new image as the old image
@dengsauve
dengsauve / main.rb
Created June 22, 2021 00:06
Google Calendar Audit Public View
###
#
# Setup: This requires an 'emails.txt' file in this directory as well
#
# Simply run 'ruby main.rb' and wait
#
# You may run in to issues when attempting to grab more than 100 addresses without refactoring threading to pools
#
# n.b. you'll get bot banned, be careful
#
@dengsauve
dengsauve / docker-compose-reset.sh
Last active January 5, 2021 18:00
Docker Compose clean teardown and rebuild
# Stop the container(s) using the following command:
docker-compose down
# Delete all containers using the following command:
docker rm -f $(docker ps -a -q)
# Delete all volumes using the following command:
docker volume rm $(docker volume ls -q)
# Restart the containers using the following command:
@dengsauve
dengsauve / monty_hall.rb
Last active December 9, 2020 04:47
Basic simulation of a series of the Monty Hall Problem
# ######################################################################################################################
# The Monty Hall Problem #
# ########################
#
# The Premise:
# Three identical boxes are presented to a player
# Two are duds, and one contains a prize
# The player chooses one box, having no idea of what it might contain.
# In this instance, each box has a 33.3% chance of being a winner, and a 66.6% chance of being a dud (RIP 0.1%)
# A moderator then removes one of the duds from play, leaving the players original choice, and one other box
@dengsauve
dengsauve / README.md
Last active December 5, 2020 17:58
Advent of Code 2020
@dengsauve
dengsauve / gh-issue.rb
Last active October 29, 2020 20:20
GitHub CLI Issue Command Generator
# Make sure to change LOGIN to your user name
output = "gh issue create -a LOGIN "
args = []
arglist = [
['repo [OWNER/REPO]', '--repo'],
['title', '--title'],
['body', '--body'],
['label [bug, feature, etc] csv in string', '--label'],
['project', '--project'],
@dengsauve
dengsauve / validateNumber.js
Last active September 30, 2020 00:43
Realtime number input validation (playing a little code golf)
document.getElementById("numberInput").addEventListener("input", function (e) {
const numberArr = e.target.value.toString().split("."); // float as string, two values
if (numberArr.length > 1 && numberArr[1].length > 2) // checking 2nd value longer than 2, then assigning..
e.target.value = parseFloat(numberArr[0] + "." + numberArr[1].substring(0,2)); // ..the correct value
});
@dengsauve
dengsauve / jQueryAutocomplete.html
Last active August 9, 2019 08:13
jQuery Autocomplete Suggestions for Text Input - since bootstrap doesn't really provide one
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">