Skip to content

Instantly share code, notes, and snippets.

View Unit2795's full-sized avatar

David Jozwik Unit2795

View GitHub Profile
@Unit2795
Unit2795 / modal.html
Created December 17, 2025 20:55
Example of using the form method "dialog" to automatically close a native dialog html element without using Javascript.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Dialog Example</title>
<style>
dialog {
padding: 1.5rem;
border-radius: 6px;
border: 1px solid #ccc;
@Unit2795
Unit2795 / ScrollOnLoad.jsx
Created December 17, 2025 20:32
Scroll an element into view on load using a ref in React. This can work for vertical and horizontal scrolling.
import {useEffect, useRef} from "react";
function ScrollOnLoad() {
const targetRef = useRef(null);
useEffect(() => {
targetRef.current?.scrollIntoView({
behavior: "smooth", // smooth scrolling effect
block: "start", // aligns the element at the top of the viewport
});
@Unit2795
Unit2795 / taskrun.ps1
Last active December 18, 2025 02:32
Simple powershell script you can use to quickly run a list of preconfigured commands. Easy to adjust command definitions.
# ----------------------------
# Command Definitions
# ----------------------------
$commands = @(
@{
Name = "Hello World - Start Dev"
Dir = "C:\repo\hello-world"
Command = "npm run start"
},
@{
@Unit2795
Unit2795 / next.config.mjs
Created November 15, 2025 03:44
SVGR Next.js config boilerplate. Only pulls in a certain directory, others retain normal Next.js static image behavior.
import path from 'path';
import { fileURLToPath } from 'url';
// __dirname is not available in Next.js, so we'll make it ourselves
// More info on what dirname is:
// https://nodejs.org/docs/latest/api/modules.html#__dirname
const dirname = path.dirname(fileURLToPath(import.meta.url));
/*
This Next.js config sets up SVGR, which allows you to import SVGs as if they were React components.
Date Format Example
MM YY 02 21
MM YYYY 02 2021
MMM YYYY Feb 2021
MMMM YYYY February 2021
YY MM 21 02
YYYY MM 2021 02
YYYY MMM 2021 Feb
YYYY MMMM 2021 February
@Unit2795
Unit2795 / Text Tags.md
Last active November 25, 2020 03:31
Text Tags - eSign Genie

eSign Genie Text Tags

To send a PDF document from your application for signature, you need to define the signature and other eSign Genie fields in the documents, and who is allowed to fill in the data. eSign Genie supports simple Text Tags that allow you to embed fields from any word processor.

A Text Tag is a simple text block within your PDF document which defines the field type, the party who is responsible for it, and other field specific options.

Quick Tip: When you apply Text Tags to the document, eSign Genie does not remove or replace the Text Tags text. You can hide codified Text Tags by using the same font color as the background of the document. So the Text Tags can be used by eSign Genie processes and it will not be visible on the document.

Main Text Tag Properties