Skip to content

Instantly share code, notes, and snippets.

View dually8's full-sized avatar

CJ Coffey dually8

View GitHub Profile
@dually8
dually8 / helldivers2.py
Last active April 6, 2024 15:28
For Adafruit Macropad RP2040
# Place in /macros directory of macropad storage
# e.g., H:/macros/helldivers2.py
# Credits: https://adafruit-playground.com/u/squid_jpg/pages/easy-helldivers-ii-stratagem-macros-for-rp2040-macropad
# Strategem List: https://www.stratagemhero.com/stratagems
# Macropad Project: https://learn.adafruit.com/macropad-hotkeys/project-code
# MACROPAD Hotkeys: Helldiver II
import random
from adafruit_hid.keycode import Keycode
START_INPUT_DELAY = 0.4
@dually8
dually8 / cognitive-distortions.md
Last active April 1, 2024 14:05
Cognitive Distortions

Cognitive Distortions

From Feeling Good: The New Mood Therapy by Dr. David D. Burns

  1. ALL-OR-NOTHING THINKING: You see things in black-and-white categories. If your performance falls short of perfect, you see yourself as a total failure.
  2. OVERGENERALIZATION: You see a single negative event as a never-ending pattern of defeat.
  3. MENTAL FILTER: You pick out a single negative detail and dwell on it exclusively so that your vision of all reality becomes darkened, like the drop of ink that colors the entire beaker of water.
  4. DISQUALIFYING THE POSITIVE: You reject positive experiences by insisting they "don't count" for some reason or other. In this way you can maintain a negative belief that is contradicted by your everyday experiences.
  5. JUMPING TO CONCLUSIONS: You make a negative interpretation even though there are no definite facts that convincingly support your conclusion. a. Mind reading. You arbitrarily conclude that someone is reacting negatively to you, and you don't
@dually8
dually8 / stitch-pngs.ps1
Created October 30, 2023 21:56
Stitch together PNGs to make tileset
# Install ImageMagick via scoop
# scoop install imagemagick
# Check if ImageMagick is installed
if (-not (Test-Path -Path (Get-Command magick.exe -ErrorAction SilentlyContinue))) {
Write-Host "ImageMagick is not installed. Please install it first."
exit 1
}
# Get a list of PNG files in the current working directory
@dually8
dually8 / Multiple-Audio-Tracks-OBS.md
Created June 8, 2023 12:03
Output multiple audio tracks in OBS
  1. First open OBS settings and select Output, then set the output mode to Advanced, then select the Audio tab. You can name your tracks here.

01 - Name OBS Audio Tracks

  1. Next, switch your output mode to Simple, and in the Recording section, check all of the audio tracks you'd like to use

02 - Set Recording to Record Tracks

  1. In the main view, select the 3 dot menu in your list of audio sources, then select Advanced Audio Properties. From here, you can select the checkboxes corresponding to the audio tracks you named earlier. For instance, if you named track 2 "Mic", you can check boxes 1 and 2 on your Mic input and leave the rest unchecked. That way, when you're done recording, your microphone output will live inside audio tracks 1 and 2 on your recording. It's best to have all tracks under 1 che
@dually8
dually8 / debounce.test.ts
Created April 11, 2023 17:12
Debounce Function in Typescript
import { debounce } from './debounce';
describe('Debounce', () => {
it('should test debounce', () => {
jest.useFakeTimers();
const oneSecond = 1000;
const obj = {
foo: 'foo',
bar: 'bar',
}
@dually8
dually8 / groupby.test.ts
Created April 11, 2023 14:51
TypeScript GroupBy Replacement for Lodash
import { groupBy } from './groupby.ts';
describe('Array Utils Test', () => {
it('should test groupBy', () => {
const data = getGroupByData();
const actual = groupBy(data, 'name');
const expected = getGroupByExpected();
expect(actual).toEqual(expected);
})
})
@dually8
dually8 / config-teams.md
Created February 3, 2023 19:45
Configuring MS Teams in Elgato Stream Deck

How to configure MS Teams in Elgato Stream Deck Software

  1. Select the "..." menu button next to your profile icon in Teams
    • step01
  2. Select "Settings"
    • step02
  3. Select the tab labeled "Privacy"
  4. Scroll down to the bottom on the right side of the window and select "Manage API"
    • step03
  5. Select the "Enable API" toggle
@dually8
dually8 / p3p-p4g-gamepass-to-steam.md
Last active January 28, 2023 03:17
Transfer Persona 3 Portable or Persona 4 Golden Save From Game Pass to Steam
@dually8
dually8 / 1_instructions.md
Last active April 25, 2024 17:14
Transfer N64 saves to Nintendo Switch Online

How To Transfer N64 Saves To Nintendo Switch Online

This is a guide on how to transfer saves from an original n64 cart to NSO. While this isn't an exhaustive list, this should help get you started. Each save is different and has different instructions on how to transfer it depending on what kind of save it is. Please use the game list table to see how each game should be transferred.

NOTE: You will need a jailbroken switch in order to perform this. I personally use JKSV to transfer my saves back and forth.

EEP

Copy and paste the .eep file to the save directory and rename it to cartridge.sram.

@dually8
dually8 / handling-merge-conflicts.md
Created August 22, 2022 15:01
Handling Merge Conflicts

Pre-commit/push script for projects that use Node

npm run build && npm run test && npm run e2e

Set your default formatter in VSCode

press shift+ctrl+p or shift+cmd+p to bring up the command palette in VSCode, then search for "Format Document With" format-document-with use-typescript-language-features