Skip to content

Instantly share code, notes, and snippets.

View Segmentational's full-sized avatar

Jacob B. Sanders Segmentational

  • Colorado, United States
  • 20:16 (UTC -12:00)
View GitHub Profile
@Segmentational
Segmentational / index.js
Last active November 19, 2021 12:56
Commands Directory Parser Package Script
#!/usr/bin/env node
// @Requirements
// ├── README.md
// ├── package.json
// ├── scripts
// | ├── Platform.js <-- CLI Target Script
// | ├── Process.js <-- Child-Process Import
// │ ├── index.js <-- The Containing Module
// │ └── package.json <-- ESM Compliant Package
@Segmentational
Segmentational / iCloud-Drift.Bash
Created November 23, 2021 08:03
iCloud-Drift Synchronization Script
#!/usr/bin/bash --posix
cd ~/Library/Application\ Support
killall bird && rm -rf CloudDocs
exit ${?}
@Segmentational
Segmentational / README.md
Created November 23, 2021 16:46
Express.js Triage

Express Triager Guide

Issue Triage Process

When a new issue or pull request is opened the issue will be labeled with needs triage. If a triage team member is available they can help make sure all the required information is provided. Depending on the issue or PR there are several next labels they can add for further classification:

  • needs triage: This can be kept if the triager is unsure which next steps to take
@Segmentational
Segmentational / Example.js
Created November 26, 2021 02:36
Object Getters and Setters
import { Settings } from "./settings.js";
export const Test = {
get example() {
return Settings.attribute;
},
set example(value) {
Settings.attribute = value;
},
get settings() {
@Segmentational
Segmentational / HTML-Tag-RegEx.js
Created December 6, 2021 09:47
HTML Tag RegEx
const Expression = new RegExp("<\s*a[^>]*>(.*?)<\s*/\s*a>");
@Segmentational
Segmentational / IPV4-RegEx.js
Created December 6, 2021 09:49
IPV4 RegEx Expression
const Expression = new RegExp("^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$");
@Segmentational
Segmentational / URI-RegEx-1.js
Created December 6, 2021 09:52
URL Regular Expression (1) - Basic
const Expression = new RegExp("^((http[s]?|ftp):\/)?\/?([^:\/\s]+)((\/\w+)*\/)([\w\-\.]+[^#?\s]+)(.*)?(#[\w\-]+)?$");
@Segmentational
Segmentational / IPV6-RegEx.js
Created December 6, 2021 09:53
IPV6 Regular Expression
const Expression = new RegExp("(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))");
@Segmentational
Segmentational / Valid-Hostname-Regular-Expression.js
Created December 6, 2021 09:54
Hostname Regular Expression
const Expression = new RegExp("^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$");
@Segmentational
Segmentational / index.js
Last active December 12, 2021 11:43
Virtual, Simplified Proxy Object (Array Extension)
/***
*
* A simplified ***Virtual*** Proxy Object
*
* @external Snippet
*
* - [ES2015 Definition](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy)
* - [Considerations Around Polyfills](https://babeljs.io/docs/en/learn#proxies)
* - Note: the following application shouldn't be implemented within a browser context; therefore,
* the lack of polyfill(s) shouldn't be heeded.