Skip to content

Instantly share code, notes, and snippets.

View varyndev's full-sized avatar

John Foster varyndev

View GitHub Profile
@varyndev
varyndev / try-catch.js
Created October 23, 2024 18:28
Example of the try/catch block with JavaScript
try {
someFunction(); // may throw three types of exceptions
} catch (exception) {
if (exception instanceof TypeError) {
// statements to handle TypeError exceptions
} else if (exception instanceof RangeError) {
// statements to handle RangeError exceptions
} else if (exception instanceof EvalError) {
// statements to handle EvalError exceptions
} else {
@varyndev
varyndev / listgroupusers.sh
Created June 3, 2024 04:38
List all members of a group on macOS
#!/bin/bash
# members -- list all members of a group
#
# SYNOPSIS
# members groupname
#
# http://superuser.com/questions/279891/list-all-members-of-a-group-mac-os-x
# by Arne
# Expected to work on Mac OS 10.5 and newer, tested on 10.6 and 10.7.
# It could be rewritten to work on 10.4 by using "dseditgroup -o checkmember"
@varyndev
varyndev / imageLoader.js
Created October 14, 2020 16:01
Pieces of the load image problem
/* Load images into an array.
* Use file picker UI to select image files: https://web.dev/read-files/
* Use File API to select an image. See https://davidwalsh.name/resize-image-canvas
* Use PreloadJS to load the image.
* Use CreateJS to display the image.
*
*/
var queue; // PreloadJS load queue
var userImages = []; // List of user selected image paths
@varyndev
varyndev / meta-tags.md
Created February 23, 2019 23:43 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">