Skip to content

Instantly share code, notes, and snippets.

@brettz9
brettz9 / javascript.json
Last active November 4, 2023 18:22
VSC JS snippets (work in progress): ~/Library/Application Support/Code/User/snippets/javascript.json
{
// Place your snippets for javascript here. Each snippet is defined under
// a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and
// the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position,
// and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
// Example:
// "Print to console": {
// ID_Start (includes Other_ID_Start)
shimIndexedDB.__setConfig(
'UnicodeIDStart'
'(?:[$A-Z_a-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B4\\u08B6-\\u08BD\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0
@brettz9
brettz9 / html5-dataset.js
Last active April 29, 2023 14:58
Dataset Shim
/**
* Add dataset support to elements
* No globals, no overriding prototype with non-standard methods,
* handles CamelCase properly, attempts to use standard
* Object.defineProperty() (and Function bind()) methods,
* falls back to native implementation when existing
* Inspired by http://code.eligrey.com/html5/dataset/
* (via https://github.com/adalgiso/html5-dataset/blob/master/html5-dataset.js )
* Depends on Function.bind and Object.defineProperty/Object.getOwnPropertyDescriptor (polyfills below)
* All code below is Licensed under the X11/MIT License
@brettz9
brettz9 / styles.less
Last active April 26, 2023 21:06
Atom stylesheet
/*
* Your Stylesheet
*
* This stylesheet is loaded when Atom starts up and is reloaded automatically
* when it is changed and saved.
*
* Add your own CSS or Less to fully customize Atom.
* If you are unfamiliar with Less, you can read more about it here:
* http://lesscss.org
*/
@brettz9
brettz9 / .gitconfig
Last active February 27, 2023 09:44
Gitconfig which adds tools for Git GUI (Rebase, Revert, Stash, Tagging/Describe, (Arbitrary) command/git command, npm view, npm run, Git config, open file (and open this gist); Status for the fun of it)
[user]
name = Brett Zamir
email = brettz9@yahoo.com
[gui]
[gui]
encoding = utf-8
recentrepo = C:/wamp/www/_servers/me-pedia.org/me-pedia.org/extensions/intersection
recentrepo = C:/wamp/www/json-schema-spec
recentrepo = C:/wamp/www/file-type-icons
recentrepo = C:/wamp/www/symbols-tree-view
@brettz9
brettz9 / keymap.cson
Last active December 13, 2022 06:52
Keymap.cson config for Atom
# Your keymap
#
# Atom keymaps work similarly to style sheets. Just as style sheets use
# selectors to apply styles to elements, Atom keymaps use selectors to associate
# keystrokes with events in specific contexts. Unlike style sheets however,
# each selector can only be declared once.
#
# You can create a new keybinding in this file by typing "key" and then hitting
# tab.
#
@brettz9
brettz9 / Table-of-Contents.md
Last active December 10, 2022 21:29
Gist Table of Contents (focusing for now on still useful items or at least interesting experiments); also may organize info on repos
@brettz9
brettz9 / settings.json
Created December 10, 2022 21:29
User settings for VSC (work in progress): ~/Library/Application Support/Code/User/settings.json
{
"gitlens.hovers.currentLine.over": "line",
"gitlens.currentLine.enabled": false,
"gitlens.codeLens.enabled": false,
"gitlens.hovers.enabled": false,
"editor.accessibilitySupport": "off",
"editor.fontSize": 17,
"editor.minimap.enabled": false,
"editor.acceptSuggestionOnEnter": "off",
"editor.quickSuggestions": { "other": false, "comments": false, "strings": false },
/*jslint continue:true*/
/**
* Adapted from {@link http://www.bulgaria-web-developers.com/projects/javascript/serialize/}
* Changes:
* Ensures proper URL encoding of name as well as value
* Preserves element order
* XHTML and JSLint-friendly
* Disallows disabled form elements and reset buttons as per HTML4 [successful controls]{@link http://www.w3.org/TR/html401/interact/forms.html#h-17.13.2}
* (as used in jQuery). Note: This does not serialize <object>
* elements (even those without a declare attribute) or
@brettz9
brettz9 / snippets.cson
Last active April 12, 2022 23:33
Atom snippets file
# Your snippets
#
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to
# expand the prefix into a larger code block with templated values.
#
# You can create a new snippet in this file by typing "snip" and then hitting
# tab.
#
# An example CoffeeScript snippet to expand log to console.log:
#