Skip to content

Instantly share code, notes, and snippets.

View pmichelazzo's full-sized avatar

Paulino Michelazzo pmichelazzo

View GitHub Profile
@cesarmiquel
cesarmiquel / drupal-8-cheatsheet.md
Last active May 24, 2024 06:01
Drupal 8/9/10 Cheatsheet

Drupal 8 Cheatsheet

[Update 2024] - This gist is almost useless compared to Drupal at your fingertips. Will create pull requests to update that if something is not already there.

Files, Images and Media

// Load file object
$file = File::load($fid);
@bzerangue
bzerangue / _verify-repair-permissions-disk.md
Last active June 2, 2024 09:37
Mac OS X Utilities via Terminal: (Verify and Repair: Disk Permissions AND Disk / Software Update / TimeMachine)

Verify and Repair Disk Permissions via Terminal (Mac OS X)

Verify Permissions

diskutil verifyPermissions /

Repair Permissions

diskutil repairPermissions /

@mankyKitty
mankyKitty / SolrDrupalCheatSheet.md
Last active May 23, 2017 13:03
This is a cheat sheet and rough guide to the integration of Drupal and Apache Solr. It will contain useful functions and how to combine them, a basic layout on how the components fit together, and some DOs and DON'Ts. All of this is based on the [apachesolr](http://drupal.org/project/apachesolr) integration, if you're using a different module th…

#Drupal & Apache Solr Integration

This is a cheat sheet and rough guide to the integration of Drupal and Apache Solr. It will contain useful functions and how to combine them, a basic layout on how the components fit together, and some DOs and DON'Ts. All of this is based on the apachesolr integration, if you're using a different module then this will probably be of no use to you.

Useful Functions

Load All Environments

Within the Apache Solr module there is support for connecting to multiple Solr instances, each the configured connections is considered an environment within the context of the Solr modules operations. When you're interacting with Solr and there is only one connection configured then you mostly do not have to be concerned with this as the module will load the default environment by itself. However you should always try to ensure that anything you construct around Solr is designed to handle the existence of multiple environments.