Skip to content

Instantly share code, notes, and snippets.

View danny-englander's full-sized avatar

Danny Englander (he/him) danny-englander

View GitHub Profile
@danny-englander
danny-englander / xdebug_lando_phpstorm.md
Last active October 29, 2024 09:47 — forked from miloskroulik/xdebug_lando_phpstorm.md
How to setup xdebug + Lando + PHPstorm when using Drupal 8/9 recipe

This assumes you are using a Drupal 8 or Drupal 9 recipe and Mac OS. Also, xdebug 3.x is assumed, which is standard for Lando-provided PHP image.

Set up Lando

Example .lando.yml file can look like this:

name: xdebug-test
recipe: drupal8
config:
 webroot: web
@danny-englander
danny-englander / nunjucks-multilevel-navigation
Created May 5, 2022 19:32 — forked from benald/nunjucks-multilevel-navigation
Nunjucks Multi Level Navigation Template
// JSON Structure
[{
"title": "Home",
"name": "index"
},
{
"title": "Find a service",
"name": "find a service"
},
{
@danny-englander
danny-englander / custom.theme.php
Last active December 7, 2022 12:28 — forked from krisrobinson/custom.theme.php
Drupal 8 check paragraph bundles and print out view modes in node.hml.twig
<?php
use Drupal\paragraphs\Entity\Paragraph;
/**
* Implements template_preprocess_node
*
* Add variables for paragraphs available to node templates
*/
function CUSTOM_preprocess_node(&$variables) {
// Convenience Variables
@danny-englander
danny-englander / suno-download-all-songs.js
Created January 6, 2025 21:56 — forked from FGRibreau/suno-download-all-songs.js
Download all Suno (app.suno.ai) songs displayed on a page
// open your javascript console and paste this
copy([...$('[role="grid"]')[Object.keys($('[role="grid"]')).filter(x => x.startsWith('__reactProps'))[0]].children[0].props.values[0][1].collection].filter(x => x.value.audio_url).map(x => x.value.audio_url).join(' '))
// now you have a list of mp3 urls directly in your clipboard that you can pass to wget or a url downloader