Skip to content

Instantly share code, notes, and snippets.

View David263's full-sized avatar
💭
Learning about new Web technology

David Spector David263

💭
Learning about new Web technology
  • Springtime Software
  • Maine, USA
View GitHub Profile
@David263
David263 / Regex For Word.txt
Last active July 20, 2022 19:41
How to write a regular expression/regex to recognize your own definition of a word
Let's say you want your word to be an identifier containing a letter, digit, hyphen, period, or minus sign. It is this easy:
[a+-zA-Z0-9._-]?!([a+-zA-Z0-9._-])
@David263
David263 / gen-password.php
Created July 20, 2022 12:57
Generate good passwords for use on mobile devices/smartphones
<?php
/*
Generate good passwords for mobile use
Created by David Spector, Springtime Software 2022
Public Domain
ver=7/20/22 released
Tested only on Windows 10: uses PHP function random_int
@David263
David263 / gist:21f583309fcd548b888655245c78f74e
Created February 24, 2020 12:27
How Open Software Fails
Just my personal opinion, but I see many issues on GitHub that have been discussed and a change is ready to be released, but it just doesn't happen, in this case for a year, but frequently for many years. In some cases it is because the single original developer has abandoned the project. I'm not sure of the entire range of reasons.
As a retired software engineer, I would like to participate in Open Software development, but am completely turned off to the idea because, with the exception of currently popular and very active projects, changes proposed for projects don't actually get made.
In addition, I've taken several courses in git and GitHub and tried to make changes using pull requests (both locally on cloned repositories and on GitHub), but these have failed with error messages I cannot understand. I find the git process to be arcane, meaning too difficult to use.
Open Software is a great idea: letting skilled people contribute their time for free to improve shared products. But the main tool support
@David263
David263 / gist:545f47d30e01d34150a555e703796f6c
Created September 10, 2019 20:34
Markdown: suggested addition: Boxes!
Markdown suggestion: provide brackets to indicate rectangles with background color ("boxes"). I suggest Notices and Warnings as subtypes, mostly specifying a light yellow or light red background color.
@David263
David263 / gist:cb17e41d30b2bcc86043873d8e7be9e4
Created September 10, 2019 20:31
Markdown: suggested addition: escape from Markdown
Markdown suggestion: Provide an escape from Markdown, brackets that one can put around text that is to be included as-is.
@David263
David263 / setTimeoutPromise.js
Created December 21, 2018 15:11
A Promise version of setTimeout, to easily add a delay to an asynchronous operation
// Wrap setTimeout in a Promise
function delay(msec,value)
{
return new Promise(function(OKFunction)
{
setTimeout(OKFunction,msec,value);
});
} // delay