Skip to content

Instantly share code, notes, and snippets.

View maxatdetroit's full-sized avatar
:shipit:
Focusing

Max Morgan maxatdetroit

:shipit:
Focusing
View GitHub Profile
@maxatdetroit
maxatdetroit / simple-dropdown-example.js
Created January 17, 2025 22:22
Example of using JS object getter/setter accessors in conjunction with HTML5 component attributes to manage internal state and public API
class SimpleDropdown extends HTMLElement {
static get observedAttributes() {
return ['expanded'];
}
constructor() {
super();
this.attachShadow({ mode: 'open' });
// Initialize private state
@maxatdetroit
maxatdetroit / services.yml
Created September 27, 2023 14:27
Example of Twig debug enabled.
parameters:
session.storage.options:
# ... ommitted for brevity
twig.config:
# Twig debugging:
#
# When debugging is enabled:
# - The markup of each Twig template is surrounded by HTML comments that
# contain theming information, such as template file name suggestions.
# - Note that this debugging markup will cause automated tests that directly
@maxatdetroit
maxatdetroit / launch.json
Created September 27, 2023 14:02
VSCode configuration for XDebug.
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9003,
"pathMappings": {
"/app/": "${workspaceFolder}/",