Skip to content

Instantly share code, notes, and snippets.

jonshipman / styles.csv
Created May 5, 2023 20:03
Stable Diffusion Artist Styles
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 5 columns, instead of 3. in line 1.
Aaron Horkey,"style of Aaron Horkey",""
Abbott Handerson Thayer,"style of Abbott Handerson Thayer",""
Abigail Larson,"style of Abigail Larson",""
Adam Hughes,"style of Adam Hughes",""
Adrian Ghenie,"style of Adrian Ghenie",""
Adrian Tomine,"style of Adrian Tomine",""
Adrianus Eversen,"style of Adrianus Eversen",""
Agnes Cecile,"style of Agnes Cecile",""
Agostino Arrivabene,"style of Agostino Arrivabene",""

Dropsolid Personalisation 1 on 1


`php working


Install drupal

mkdir drupal && cd drupal && curl -sSL | tar -xz --strip-components=1

installing compser

signalpoint / example.php
Last active July 16, 2022 23:41
Drupal 8 Set Message Example
// The drupal_set_message() function is being deprecated!
// @see
// > Deprecated in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
// > Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
// In some custom code.
\Drupal::messenger()->addMessage('Say something else');
# SPECIFIC: Block #submit #validate #process #pre_render #post_render #element_validate #after_build #value_callback parameters
SecRule REQUEST_FILENAME "(index\.php|\/$)" "chain,id:003294,t:lowercase,t:none,t:utf8toUnicode,t:urlDecodeUni,t:urldecode,block"
SecRule ARGS_NAMES|REQUEST_COOKIES_NAMES "^\#(submit|validate|pre_render|post_render|element_validate|after_build|value_callback|process)$|\[(?:\'|\")?#(submit|validate|pre_render|post_render|element_validate|after_build|value_callback|process)"
# GENERIC: Block all parameters starting with #
SecRule REQUEST_FILENAME "(index\.php|\/$)" "chain,id:003309,t:lowercase,t:none,t:utf8toUnicode,t:urlDecodeUni,t:urldecode,block"
ummdorian / index.php
Created March 28, 2018 14:57
Drupal 8 Query Alter Group By (views)
function module_query_views_events_alter(Drupal\Core\Database\Query\AlterableInterface $query){
// If this the right query
$query->getMetaData('view') != ''
&& $query->getMetaData('view')->getDisplay()->display['id'] == 'block_3'
dinarcon / nicaragua.module
Created November 7, 2017 14:20
Conditional fields in Paragraphs using the Javascript States API for Drupal 8
* @file
* Example code from
* Implements hook_field_widget_WIDGET_TYPE_form_alter().
* Example of conditional fields in paragraphs for Drupal 8.
Timi7007 /
Last active December 20, 2022 15:09
Collection on all things HTTPS. Includes settings for TLS on nginx (which desperately need an update!).


Collection on all things HTTPS. Includes settings for TLS on nginx (which desperately need an update!).

Until I update this, I'd recommend you take a look at

My current settings for TLS on nginx/1.10.3 on Ubuntu Server 16.04 LTS

See on how to install the lastest version of nginx.

Most settings are sourced from,, and

slivorezka / get_image_path_with_image_style.php
Created November 8, 2016 10:40
Drupal 8: Get Image URL / URI with Image Style
use Drupal\file\Entity\File;
use Drupal\image\Entity\ImageStyle;
// File ID.
$fid = 123;
// Load file.
$file = File::load($fid);
// Get origin image URI.
$image_uri = $file->getFileUri();
// Load image style "thumbnail".
crittermike / get_node_by_path.php
Created September 16, 2016 15:15 — forked from thagler/get_node_by_path.php
Drupal 8 Get node ID by path alias
$path = \Drupal::service('path.alias_manager')->getPathByAlias('/this-is-the-alias');
if(preg_match('/node\/(\d+)/', $path, $matches)) {
$node = \Drupal\node\Entity\Node::load($matches[1]);
woombo / hook_inline_entity_form_table_fields_alter.module
Last active February 11, 2016 18:12
* Implements hook_inline_entity_form_table_fields_alter().
function MODULE_inline_entity_form_table_fields_alter(&$fields, $context) {
if ($context['parent_bundle'] === 'MODULE' &&
$context['entity_type'] === 'MODULE_text_asset') {
// Remove Title.