Skip to content

Instantly share code, notes, and snippets.

View rob-p2's full-sized avatar
🎯
Focusing

Rob Montero rob-p2

🎯
Focusing
View GitHub Profile
@justinhartman
justinhartman / 01_introduction.md
Last active March 13, 2025 09:40
Setup Debian 10 LEMP Virtual Machine or Server

How To Install Nginx, MySQL, PHP, Redis and more on a Debian 10 Virtual Machine

This series of documents will configure and setup a Nginx, MySQL, and PHP (LEMP) server on a pretty feature-rich VM running Debian. I used a VM with 8GB RAM and 4 CPU Cores so YMML with some of the settings below.

This will also install other useful packages and configurations like, Redis, Memcached, Node, NPM, Composer, and a fully automated SSL service using certbot for Let's Encrypt.

@bdlangton
bdlangton / Blocks.md
Last active October 12, 2023 08:40
Drupal 8 programmatic solutions

Render custom blocks

$bid = 'myblock';
$block = \Drupal\block_content\Entity\BlockContent::load($bid);
$render = \Drupal::entityTypeManager()->getViewBuilder('block_content')->view($block);

Render plugin blocks

$block_manager = \Drupal::service('plugin.manager.block');