$ brew install https://gist.githubusercontent.com/jgilfelt/907d60ba5657e18daf9b4db1e442a6b0/raw/a56bc99ade0c86a60c954ec42cd2bc3bba8180ce/imagemagick.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Import arbitrary config from a variable. | |
// Assumes $data has the data you want to import for this config. | |
$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'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drupal\MODULE_NAME\Plugin\views\style; | |
use Drupal\rest\Plugin\views\style\Serializer; | |
/** | |
* The style plugin for serialized output formats with pager. | |
* | |
* @ingroup views_style_plugins |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Taxonomy terms: | |
- https://gist.github.com/facine/35bb291811c146b6fc9e#file-create_taxonomy_term-php | |
# Menu links: | |
- https://gist.github.com/facine/35bb291811c146b6fc9e#file-create_menu_link-php | |
# File items: | |
- https://gist.github.com/facine/35bb291811c146b6fc9e#file-create_file-php | |
# Nodes: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Because I'm always struggling, a note for myself (and for others) how it works. | |
Installing PHP PECL IMagick on Ubuntu: | |
-------------------------------------- | |
1. $ sudo aptitude install php-pear imagemagick php5-dev libmagick9-dev | |
2. $ sudo pecl install Imagick | |
3. $ sudo nano /etc/php5/apache2/php.ini | |
4. enter extension=imagick.so -> save (ctrl+x / Y) | |
5. $ sudo apache2ctl configtest |