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 | |
function icl_get_recent_posts($limit = 10, $language) { | |
global $wpdb; | |
include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); | |
if (is_plugin_active('sitepress-multilingual-cms/sitepress.php')) { | |
$querystr = " | |
SELECT wposts.* | |
FROM {$wpdb->prefix}posts wposts, {$wpdb->prefix}icl_translations icl_translations | |
WHERE wposts.ID = icl_translations.element_id |
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
# @file | |
# Local development services. | |
services: | |
cache.backend.null: | |
class: Drupal\Core\Cache\NullBackendFactory | |
parameters: | |
twig.config: | |
debug: true | |
cache: false |
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 | |
error_reporting(E_ALL); | |
/* Get the port for the service. */ | |
$port = "9100"; | |
/* Get the IP address for the target host. */ | |
$host = "172.17.144.89"; | |
/* construct the label */ |
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 | |
/** | |
* @file | |
* Local development override configuration feature. | |
*/ | |
/** | |
* Assertions. | |
* | |
* The Drupal project primarily uses runtime assertions to enforce the |
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
version: '3' | |
services: | |
web-app: | |
image: erighetto/drupal-dev:latest | |
ports: | |
- "80:80" | |
depends_on: | |
- dbserver | |
links: |
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
docker stop $(docker ps -a -q) && docker rm $(docker ps -a -q) && docker volume rm $(docker volume ls -qf dangling=true) |
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
# Ignore configuration files that may contain sensitive information. | |
/sites/*/settings*.php | |
/.htpasswd | |
# Ignore the boost cache | |
/cache | |
/cache/* | |
# Ignore the files | |
/sites/*/files |
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 | |
$entities = array_keys(\Drupal::entityTypeManager()->getDefinitions()); | |
sort($entities); | |
foreach ($entities as $entity) { | |
$current_field_storage_definitions = \Drupal::entityManager()->getFieldStorageDefinitions($entity); | |
\Drupal::service('entity.last_installed_schema.repository') | |
->setLastInstalledFieldStorageDefinitions($entity, $current_field_storage_definitions); |
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
[ | |
{ | |
"op": "core/column-split", | |
"description": "Split column Column 1 by separator", | |
"engineConfig": { | |
"facets": [], | |
"mode": "row-based" | |
}, | |
"columnName": "Column 1", | |
"guessCellType": true, |
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
# When transferring an iTunes library to a new Mac, one common issue is that album artwork often fails to display correctly. | |
# This can happen because iTunes stores cover art separately from the actual MP3 files, so artwork may not carry over smoothly during migration. | |
# To solve this, a Python script can be used to embed album cover images directly into each MP3 file's metadata. | |
# By embedding the artwork, each song will retain its cover art no matter where it’s moved or which music player is used. | |
# This approach ensures a more seamless experience, making the iTunes library look complete and visually organized on the new device. | |
# This script simplifies the embedding process by automating image retrieval and integration for each MP3 file, | |
# saving users from the hassle of manually adding artwork. | |
import os |