Skip to content

Instantly share code, notes, and snippets.

@brunodbo
brunodbo / import.php
Created April 29, 2019 21:14 — forked from crittermike/import.php
Importing Drupal 8 config programmatically
<?php
// Import arbitrary config from a variable.
$config = \Drupal::service('config.factory')->getEditable('filter.format.basic_html');
$config->setData($data)->save();
// Or, re-import the default config for a module or profile, etc.
\Drupal::service('config.installer')->installDefaultConfig('module', 'my_custom_module');
// Or, import YAML config an arbitrary directory.
@brunodbo
brunodbo / mymodule.libraries.yml
Created May 12, 2017 19:41 — forked from steffenr/mymodule.libraries.yml
Attach a CSS or JS library to a View in Drupal 8
custom_view:
css:
component:
css/custom_view.css: {}
@brunodbo
brunodbo / composer.json
Created April 10, 2017 16:51 — forked from joelpittet/composer.json
D8 Composer & Patches
{
"name": "drupal-composer/drupal-project",
"description": "Project template for Drupal 8 projects with composer",
"type": "project",
"license": "GPL-2.0+",
"authors": [
{
"name": "",
"role": ""
}
@brunodbo
brunodbo / firefox-developer-edition.desktop
Last active September 13, 2015 04:23 — forked from jaywink/firefox-developer-edition.desktop
Firefox Developer Edition (or any edition), separate Unity launcher icon (Ubuntu 14.04)
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=Firefox Developer Edition
Icon=/opt/firefox/browser/icons/mozicon128.png
Path=/opt/firefox/firefox
Exec=/opt/firefox/firefox --class="firefox-developer" -P dev-edition-default %u
StartupNotify=true
StartupWMClass=firefox-developer
#!/bin/bash
#
# This program is free software. It comes without any warranty, to
# the extent permitted by applicable law. You can redistribute it
# and/or modify it under the terms of the Do What The Fuck You Want
# To Public License, Version 2, as published by Sam Hocevar. See
# http://sam.zoy.org/wtfpl/COPYING for more details.
#
# Version 3, enhanced for Ubuntu 13.X+, Fedora 19+, and similar distros.