Skip to content

Instantly share code, notes, and snippets.

@davedele
davedele / hyper.js
Created November 10, 2025 04:24
hyper.js
"use strict";
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
// default font size in pixels for all tabs
@davedele
davedele / 1234
Created November 10, 2025 01:58
reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]
"EnableLUA"=dword:00000000
"ConsentPromptBehaviorAdmin"=dword:00000000
"PromptOnSecureDesktop"=dword:00000000
"ValidateAdminCodeSignatures"=dword:00000000
@davedele
davedele / us_all.json
Last active March 22, 2025 12:16
us_all.json
{
"locations": [
{
"name": "Alabama",
"slug": "alabama",
"description": "",
"meta": [
{
"image_id": 0
},
@davedele
davedele / bc.txt
Last active October 9, 2023 22:29
b1
createHorzChart(): void {
const options: ApexCharts.ApexOptions = {
chart: { id: this.chartUID || null, type: 'bar', height: 350 },
series: [
{
name: this.seriesName,
data: this.data?.map((item) => item?.value),
label: this.data?.map((item) => item?.label)
}
],
@davedele
davedele / formatEmailForReceipt
Created June 19, 2023 06:38
function that uses regular expressions to split the email address at logical breakpoints (i.e., before a . or after a @). It then creates a string with HTML line breaks (<br>) where the email was split. This function assumes a maximum line length of 40 characters, which is typical for point-of-sale receipt printers.:
// The standard width of a typical receipt paper is 80mm, print density is about 40-48 characters per line depending on font size.
// function that uses regular expressions to split the email address at logical breakpoints (i.e., before a . or after a @, etc.).
// It then creates a string with HTML line breaks (<br>) where the email was split. This function assumes a maximum line length of 40 characters, which is typical for point-of-sale receipt printers.:
function formatEmailForReceipt(email: string): string {
const MAX_LINE_LENGTH: number = 40;
const MIN_BREAKPOINT_LENGTH: number = 10; // The minimum length before a breakpoint to consider breaking
let lines: string[] = [];
let currentLine: string = "";