- Lando + PhpStorm + Xdebug
- Youtube
- When a Lando, PHPStorm, and XDebug setup gets hairy
- Setting up Xdebug with Lando and PhpStorm
- Go to settings -> Languages & Frameworks -> PHP
Just migrated it from Codepen.io to markdown. Credit goes to David Conner.
Working with DOM | Working with JS | Working With Functions |
---|---|---|
Accessing Dom Elements | Add/Remove Array Item | Add Default Arguments to Function |
Grab Children/Parent Node(s) | Add/Remove Object Properties | Throttle/Debounce Functions |
Create DOM Elements | Conditionals |
var street = user.address && user.address.street;
var street = user.address?.street;
var street = user.address?.street ?? 'None';
const items = [ | |
{ | |
title: 'Item 1' | |
}, | |
{ | |
title: 'Item 2' | |
}, | |
{ | |
title: 'Item 3' | |
}, |
div { | |
position: relative; | |
overflow: hidden; | |
} | |
img { | |
position: absolute; | |
top: 50%; | |
transform: translate(0, -50%); | |
} |
/** | |
* Implements hook_page_attachments(). | |
*/ | |
function MODULE_NAME_page_attachments(array &$attachments) { | |
// You can optionally perform a check to make sure you target a specific page. | |
if (\Drupal::routeMatch()->getRouteName() == 'some.route') { | |
// Add our JS. | |
$attachments['#attached']['html_head'][] = [ | |
[ | |
'#tag' => 'script', |
d
option in sed command is used to delete a line.sed -i '2d' file