Skip to content

Instantly share code, notes, and snippets.

View WengerK's full-sized avatar
🤓

Kevin Wenger WengerK

🤓
View GitHub Profile
@WengerK
WengerK / README.md
Last active March 2, 2018 16:27
Article Ressources - Google Tag Manager: Tracking of Ajax actions

Article Ressources - Google Tag Manager: Tracking of Ajax actions

This is the Gist repository for my article Google Tag Manager: Tracking of Ajax actions.

Be aware that this article has been wrote for the Blog of Antistatique — Web Agency in Lausanne, Switzerland. A place where I work as Full Stack Web Developer.

Feel free to read it the full article on Medium or check it out on Antistatique.

Content of this Gist :

@WengerK
WengerK / README.md
Last active June 22, 2018 07:32
Article Ressources - Flood Control protection in Drupal 8

Article Ressources - Flood Control protection in Drupal 8

This is the Gist repository for my article Flood Control protection in Drupal 8.

Be aware that this article has been wrote for the Blog of Antistatique — Web Agency in Lausanne, Switzerland. A place where I work as Full Stack Web Developer.

Feel free to read it the full article on Medium or check it out on Antistatique.

Content of this Gist :

  • settings.php : Settings overriden manually to tweak the Flood Control
@WengerK
WengerK / README.md
Last active July 18, 2018 12:35
Article Ressources - Template Whisperer - Content-first templating in Drupal 8

Article Ressources - Template Whisperer - Content-first templating in Drupal 8

This is the Gist repository for my article Template Whisperer - Give more content confidence to your end-client.

Be aware that this article has been wrote for the Blog of Antistatique — Web Agency in Lausanne, Switzerland. A place where I work as Full Stack Web Developer.

Feel free to read it the full article on Medium or check it out on Antistatique.

Content of this Gist :

  • settings.php : Settings overriden manually to tweak the Flood Control
@WengerK
WengerK / README.md
Last active December 14, 2018 09:01
Article Ressources - Set up workflows with State Machine on Drupal Commerce 2.x

Article Ressources - Set up workflows with State Machine on Drupal Commerce 2.x

This is the Gist repository for my article Set up workflows with State Machine on Drupal Commerce 2.x.

Be aware that this article has been wrote for the Blog of Antistatique — Web Agency in Lausanne, Switzerland. A place where I work as Full Stack Web Developer.

Feel free to read it the full article on Medium or check it out on Antistatique.

Content of this Gist :

  • WorkflowHelper.php : Contains helper methods to retrieve workflow related data from entities.
@WengerK
WengerK / README.md
Last active June 20, 2019 15:21
Drupal 8  —  Differences between Configuration API & State API

Article Ressources - Drupal 8  —  Differences between Configuration API & State API

This is the Gist repository for my article Drupal 8  —  Differences between Configuration API & State API.

Be aware that this article has been wrote for the Blog of Antistatique — Web Agency in Lausanne, Switzerland. A place where I work as Full Stack Web Developer.

Feel free to read it the full article on Medium or check it out on Antistatique.

@WengerK
WengerK / mails.php
Created June 6, 2016 14:09
Drupal 8 - Send mail with Swiftmailer
<?php
use Drupal\Core\Render\Markup;
/**
* Mail hook
*/
function hook_mail($key, &$message, $params) {
$options['langcode'] = $message['langcode'];
@WengerK
WengerK / README.md
Last active August 20, 2019 09:08
Drupal 8 - Debugging Ajax Commands & Dialogs

Drupal 8 - Debugging Ajax Commands & Dialogs

'Cause it's nearly impossible to var_dump or dump into an Ajax Dialog or an Ajax Command, the most easier way is to write into the Apache logs.

To do this, just add the following snippet in your code:

error_log(var_export($var), TRUE);
@WengerK
WengerK / README.md
Last active December 31, 2019 22:37
Article Ressources - Drupal 8 - Bamboo Twig, Beyond Twig

Article Ressources - Drupal 8 - Bamboo Twig, Beyond Twig

This is the Gist repository for my article Drupal 8 - Bamboo Twig, Beyond Twig.

Be aware that this article has been wrote for the Blog of Antistatique — Web Agency in Lausanne, Switzerland. A place where I work as Full Stack Web Developer.

Feel free to read it the full article on Medium or check it out on Antistatique.

Content of this Gist :

  • bamboo_twig_renderer.html.twig : Renderer
@WengerK
WengerK / AssignmentsParameters-bad.php
Created August 23, 2019 16:16
Article Ressources - Refactoring - an ode to code
function discount(\DateTime $start_date, $bar) {
if ($bar > 50) {
$start_date->add('2 days');
}
// do some calculation based on the $start_date...
return $foo;
}
@WengerK
WengerK / README.md
Last active June 24, 2020 10:44
Implementation of push notification thought Firebase Cloud Messaging using Ionic

Article Ressources - Implementation of push notification thought Firebase Cloud Messaging using Ionic !

This is the Gist repository for my article Implementation of push notification thought Firebase Cloud Messaging using Ionic.

Be aware that this article has been wrote for the Blog of Antistatique — Web Agency in Lausanne, Switzerland. A place where I work as Full Stack Web Developer.

Feel free to read it the full article on Medium or check it out on Antistatique.

Content of this Gist :

  • android_custom_resources.js : Example of resourceDirs