Skip to content

Instantly share code, notes, and snippets.

@noraj
noraj / gulp-cjs-to-esm.md
Last active May 14, 2024 17:07
Moving gulpfile from CommonJS (CJS) to ECMAScript Modules (ESM)

Moving gulpfile from CommonJS (CJS) to ECMAScript Modules (ESM)

Context

del v7.0.0 moved to pure ESM (no dual support), which forced me to move my gulpfile to ESM to be able to continue to use del.

The author sindresorhus maintains a lot of npm packages and does not want to provides an upgrade guide for each package so he provided a generic guide. But this guide is a bit vague because it's generic and not helping for gulp, hence this guide.

Guide

@NatemcM
NatemcM / Fred RTE Config - Bootstrap
Last active April 17, 2020 15:40
Light weight TinyMCE for Fred using Bootstrap styles
{
"theme": "inlite",
"inline": true,
"plugins": "modxlink image imagetools media lists hr code visualblocks table",
"insert_toolbar": "image media quicktable modxlink hr",
"selection_toolbar": "styleselect fontsizeselect | alignleft aligncenter alignright bullist numlist | quickimage media table modxlink | undo redo removeformat | visualblocks code",
"image_advtab": true,
"imagetools_toolbar": "editimage imageoptions | alignleft aligncenter alignright | rotateleft rotateright | flipv fliph | removeformat code",
"image_class_list": [
{
@deergod1
deergod1 / Ubuntu-Unifi-Controller-PC.md
Last active January 20, 2023 20:00
Install Unifi Controller on an Old PC with Debian Ubuntu

Install Unifi Controller on an Old PC with Debian Ubuntu

No More Cloud Key for Me

After several months of dealing with these notices in my inbox, I have decided to move away from the Unifi Cloud Key.

[UniFi] Alert: UniFi Prune Database Failed
Alarm
UniFi
var plugins;
plugins = [
// plugin for integrating save button
function(viewModel) {
var saveCmd = {
name: 'Save', // l10n happens in the template
enabled: ko.observable(true)
};
saveCmd.execute = function() {
@mkay
mkay / recipient.php
Created January 18, 2014 10:08
MODX FormIt custom hook example.
<?php
// Type: Snippet
$recipient = $hook->getValue('reason');
if($recipient == 'one'){
$email = '';
}
elseif($recipient == 'two'){
$email = '';
}
@fomigo
fomigo / defaultTemplateByParentTv.plugin.php
Created April 9, 2012 15:37 — forked from bfncs/defaultTemplateByParentTv.plugin.php
Default Children Template by Parent TV - modX Revolution Plugin
<?php
/**
* =========================
* defaultTemplateByParentTv
* =========================
*
* Plugin for modX Revolution
* Set default template for children of a ressource
*
* Author: