Skip to content

Instantly share code, notes, and snippets.

Nils Deele

Block or report user

Report or block Deele

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Deele /
Last active Aug 21, 2019
Create backup archive of Drupal project files
# Settings
# Begin
Deele / mail_tester.php
Created Aug 7, 2019
Mail sending tester via Sfiftmailer (originally made for use with `drupal/swiftmailer` and `drupal/smtp` composer packages installed)
View mail_tester.php
ini_set('display_errors', 1);
function getValue($name, $default = null) {
if (isset($_POST[$name])) {
return (!empty($_POST[$name]) ? $_POST[$name] : null);
return $default;
Deele /
Last active Apr 5, 2019 — forked from TylerFisher/
Google Spreadsheets script to generate transliterated slugs from a range of cells

This script for Google Spreadsheets allows you to generate slugs for your data such as might be used for creating unique urls.

Use it like this!

# A B C
1 a b slug
2 foo baz bing =slugify(A2:B4)
3 bar BAZ
4 FOO baz-bing
Deele / ContentEntityMigrationTool.php
Created Mar 14, 2019
Drupal 8 Content Entity Migration Tool
View ContentEntityMigrationTool.php
* @property integer $total Total entities in set
* @property array $unchanged entities that were left unchanged
* @property array $succeeded entities that was successfully migrated
* @property array $failed entities that failed to migrate
* @property bool $success if all the entities were successfully migrated
class ContentEntityMigrationResult extends stdClass
Deele / updateSettings.js
Last active Jun 6, 2018
Deep extend of JSON-type settings (JS objects) with options (JS objects)
View updateSettings.js
* @param {object} settings
* @param {object} options
* @returns {object}
function updateSettings(settings, options) {
var updatedSettings = {};
if (typeof settings !== 'undefined') {
Object.assign(updatedSettings, settings);
Deele / duplicateIdsMonitoring.js
Last active Sep 4, 2017
Monitors document body for duplicate IDs and warns in console when that happens (potential for chrome extension)
View duplicateIdsMonitoring.js
(function (window) {
// Based on
window.observeDOM = (function () {
var MutationObserver = window.MutationObserver || window.WebKitMutationObserver,
eventListenerSupported = window.addEventListener;
return function (obj, callback) {
if (MutationObserver) {
// define a new observer
Deele / TinyMce.php
Last active Jul 28, 2017
Implemented an option to call widget initialization on demand (for PJAX, AJAX or other purposes).
View TinyMce.php
* @copyright Copyright (c) 2013-2017 2amigOS! Consulting Group LLC
* @link
* @license New BSD License
namespace dosamigos\tinymce;
use yii\helpers\Html;
use yii\helpers\Json;
Deele / backend__config__main.php
Last active May 23, 2018
Yii2 (advanced app) - Creating frontend URLs in backend and vice versa
View backend__config__main.php
$config = [
'components' => [
// [...]
'request' => [
'baseUrl' => $params['backend.baseUrl'],
'urlManagerFrontend' => [
'class' => 'yii\web\UrlManager',
'baseUrl' => $params['frontend.baseUrl'],
Deele /
Created May 10, 2016
Creating Drupal 8 site
Deele / horizontal-bootstrap-activeform-checkbox-view.php
Last active Dec 3, 2015
Yii2 Bootstrap ActiveForm horizontal layout checkbox syntax
View horizontal-bootstrap-activeform-checkbox-view.php
use yii\bootstrap\ActiveForm;
use yii\bootstrap\ActiveField;
$activeField = new ActiveField();
?><div class="tour-form">
<?php $form = ActiveForm::begin(); ?>
<div class="form-horizontal">
echo <<<HTML
You can’t perform that action at this time.