Skip to content

Instantly share code, notes, and snippets.

View WengerK's full-sized avatar
🤓

Kevin Wenger WengerK

🤓
View GitHub Profile
@WengerK
WengerK / JS
Created August 24, 2016 14:43
Get jQuery version from console
jQuery().jquery;
@WengerK
WengerK / ContactForm-basic.php
Last active June 12, 2023 19:39
Drupal 8 — Inline validation in forms
<?php
/**
* @file
* Contains \Drupal\my_contact\Form\ContactForm.
*/
namespace Drupal\my_contact\Form;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
@WengerK
WengerK / README.md
Last active May 10, 2017 09:33
VS Code - C'est mieux

Article Ressources - VS Code, c'est mieux !

This is the Gist repository for my article VS Code, c'est mieux.

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.json : VS Code settings.json
@WengerK
WengerK / settings.php
Created April 28, 2017 08:52
Disable Poorman Cron for Drupal 8
// Disable cron in settings.php for D8.
$config['automated_cron.settings']['interval'] = 0;
@WengerK
WengerK / README.md
Created June 4, 2017 14:55
Sort Github issues by reaction

Search UI

is:issue is:open sort:reactions-+1-desc

URL GET Parameters

?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc

@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
@WengerK
WengerK / README.md
Last active January 4, 2022 21:15
Programatically use Solr on Drupal 8

🔍 Solr (6.1.0+) search Engine & Tika (1.13+) Extractor

We are using solr for search index.

Solr need to be configured for drupal. Follow the INSTALL.txt found in the search_api_solr module.

As a pre-requisite for running your own Solr server, you'll need Java 6 or higher.

Installation

@WengerK
WengerK / databaseService.php
Created September 4, 2017 09:46
Drupal 8 - Print raw SQL queries for debugging
<?php
/**
* Debugging using the database connection.
*/
/** @var \Drupal\Core\Database\Connection */
$connection = \Drupal::service('database');
$query = $connection->select('node', 'node');
$query->fields('node', ['nid'])
@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 November 22, 2023 19:42
Drupal 8 - How to translate Config API

Article Ressources - Drupal 8, How to translate Config API

This is the Gist repository for my article Drupal 8, How to translate Config 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.

Content of this Gist :

  • SettingsForm.php : Basic Form Config