Skip to content

Instantly share code, notes, and snippets.

@alexpott
alexpott / starter_template.yml
Last active May 25, 2022 14:05
Example starter template
# Example starter template based on the discussions in https://docs.google.com/document/d/1_PoxyIPND-d2TkgrThzivcJS8B_Bg1gIIrkFsGDtmCM
name: 'An example starter template'
description: 'A description of the functionality'
# The type key is similar to the package key in module.info.yml. It
# can be used by the UI to group starter templates. Additionally,
# the type 'Site' means that the starter template will be listed in
# the installer.
type: 'Content type'
apply_first:
@alexpott
alexpott / d-o-stylesheet.css
Created February 4, 2021 23:07
User stylesheet for d.o
* Inspired by Bohjan's style */
.container-12 {
min-width: 1200px !important;
}
#header-screen {
display: none;
}
section.comments > div.comment .permalink-wrapper {
/* Inspired by Bohjan's style */
.container-12 {
min-width: 1200px !important;
}
#header-screen {
display: none;
}
section.comments > div.comment .permalink-wrapper {
float: left;
@alexpott
alexpott / quick-drupal.sh
Last active May 3, 2018 23:13
A new quick way to start drupalling on a local install. You need git and PHP (>5.5.9)
curl -sS https://ftp.drupal.org/files/projects/drupal-8.6.x-dev.zip --output drupal.zip
unzip drupal.zip
cd drupal-8.6.x-dev
php ./core/scripts/drupal quick-start
Verifying my Blockstack ID is secured with the address 15CDdYjXMqbAnRqN7dwdT5pp9PEAeM1UxT https://explorer.blockstack.org/address/15CDdYjXMqbAnRqN7dwdT5pp9PEAeM1UxT
<?php
/**
* @file
* Install, update and uninstall functions for my project.
*/
/**
* Implements hook_install().
*
<?php
namespace Drupal\custom_migration\Plugin\migrate\process;
use Drupal\Component\Utility\Html;
use Drupal\migrate\ProcessPluginBase;
use Drupal\migrate\MigrateExecutableInterface;
use Drupal\migrate\Row;
/**
@alexpott
alexpott / settings.local.php
Last active November 14, 2016 20:31 — forked from jacine/settings.local.php
settings.local.php
<?php
/**
* @file
* Local development override configuration feature.
*
* To activate this feature, copy and rename it such that its path plus
* filename is 'sites/default/settings.local.php'. Then, go to the bottom of
* 'sites/default/settings.php' and uncomment the commented lines that mention
* 'settings.local.php'.
<?php
/**
* @file
* Install, update and uninstall functions for my project.
*/
/**
* Implements hook_install().
*
So I think that we're breaking an important principle here... that config should return the data in an identical format to what you provided. At Barcelona @merlinofchaos said that CMI should be a dumb as possible and I think that here we are breaking that maxim.
Just because FAPI returns everything as strings is not a reason to go ahead here. We can leave all the simple config as strings if we want or we can use the schema (if available) to save typed config. But config entities should be allowed to save their data in the types stored on the object.