Skip to content

Instantly share code, notes, and snippets.

View djassie's full-sized avatar

Susobhan Das djassie

View GitHub Profile
@iBobik
iBobik / RegistrationProcessorWebformHandler.php
Created June 18, 2018 12:50
Drupal 8 quick&dirty webform handler what creates Commerce 2 orders and sends user to checkout. Hard coded for event registration.
<?php
namespace Drupal\registrations_processor\Plugin\WebformHandler;
use Drupal;
use Drupal\commerce\PurchasableEntityInterface;
use Drupal\commerce_order\Adjustment;
use Drupal\commerce_order\Entity\OrderInterface;
use Drupal\commerce_price\Price;
use Drupal\Core\Form\FormStateInterface;
@v1talii-dev
v1talii-dev / README.md
Last active October 2, 2022 07:18
D8: database queries
@Nilpo
Nilpo / Using Git to Manage a Live Web Site.md
Last active April 26, 2024 19:09
Using Git to Manage a Live Web Site

Using Git to Manage a Live Web Site

Overview

As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.

Contents

@sergejmueller
sergejmueller / ttf2woff2.md
Last active March 9, 2024 13:37
WOFF 2.0 – Learn more about the next generation Web Font Format and convert TTF to WOFF2
@derhasi
derhasi / drupal_hackedgit.md
Last active December 25, 2021 16:57
Script to get a diff of a Drupal dev project from git and write the diff to the projects folder: `bash check_hacked.sh $PROJECTNAME`.

Check hacked status from git

This small script provides some code to check a project of your installation (located in .../www) against the associated git commit on drupal.org.

Notice: currently the root path and temp directory are hardcoded.

Examples

Check status of views module.

@omega8cc
omega8cc / gist:5731695
Last active August 17, 2021 02:20
Steps to install and configure Redis for any Drupal site on BOA

Steps to install and configure Redis for any Drupal site on BOA:

  1. Login to the dashboard and create a ticket requesting the Redis Service.
  • No, no, scratch that. I forgot it is BOA ;)
  • OK, done!
  • Wait. What?!
  • Seriously. You don't need to do anything -- it works out of the box!

How it works?

@steffenr
steffenr / book-all-books-block.html.twig
Last active October 14, 2021 05:30
Sample used in our second blog post on theming with Twig in Drupal 8
{% for book_id, menu in book_menus %}
<nav id="book-block-menu-{{ book_id }}" class="book-block-menu">
{{ menu }}
</nav>
{% endfor %}