Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@g3r4
g3r4 / docker-compose.yml
Created April 9, 2020 15:07
Xdebug composer config
# If using linux remember to set or uncomment
# PHP_XDEBUG_REMOTE_HOST=172.17.0.1
# on your .env file
version: "2"
services:
mariadb:
image: wodby/mariadb:$MARIADB_TAG
container_name: "${PROJECT_NAME}_mariadb"
@g3r4
g3r4 / docker-ce-elementary-juno.sh
Created November 11, 2019 02:37
Install Docker-ce on Elementary OS Juno
#!/bin/bash
set -e
##########################################################
# Install script for Docker-CE on ElementaryOS Juno
# Had to update the repository to point to bionic instead
# of using 'lsb_release -cs' because there's no juno
# repository at download.docker.com.
##########################################################
@g3r4
g3r4 / hero_image.patch
Created February 8, 2018 22:24
Hero image patch for Open Social
diff --git a/modules/social_features/social_core/social_core.module b/modules/social_features/social_core/social_core.module
index 8e35646..e523b32 100644
--- a/modules/social_features/social_core/social_core.module
+++ b/modules/social_features/social_core/social_core.module
@@ -94,11 +94,28 @@ function template_preprocess_page_hero_data(array &$variables) {
if (!empty($node->{$image_field}->entity)) {
$variables['hero_styled_image_url'] = ImageStyle::load('social_xx_large')
->buildUrl($node->{$image_field}->entity->getFileUri());
+ } else { // If machine name too long or using another image field
+ $node_fields = $node->getFields();
@g3r4
g3r4 / DrupalCon2018SessionProposal.md
Last active January 18, 2018 14:36
Session proposal for DrupalCon 2018

Identifying module contribution oportunities for Drupal 8 while leveraging the PHP community with a practical example

Please give us a detailed overview of your session and why attendees will be excited to hear about it.  

In this session, I will share my experience with attendees about a very common situation most of us encounter while performing our daily tasks on our jobs: Adding custom functionality for a Drupal 8 project.

I was recently in this predicament, where you can just add the specific functionality for your client, or go the contribution path: Making the use case more universal, so other people can benefit from the code that you are about to write.

The requirement was the following: One of our clients wanted to allow his users to create support tickets using the JIRA platform using a form seamlessly integrated within the website.

Contribution setup instructions

Fork DrupalConsole

Fork your own copy of the DrupalConsole repository to your account

Clone

Get a copy of your recently cloned version of console in your machine.

$ git clone git@github.com:[your-git-user-here]/drupal-console.git