Skip to content

Instantly share code, notes, and snippets.

View timhtheos's full-sized avatar

Timothy timhtheos

View GitHub Profile
@slivorezka
slivorezka / get_image_path_with_image_style.php
Created November 8, 2016 10:40
Drupal 8: Get Image URL / URI with Image Style
<?php
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".
@davidneedham
davidneedham / ec.aliases.drushrc.php
Last active May 4, 2016 19:23
Drush Alias Wildcard for Enjoy Creativity server, allgoo.de.
<?php
/*
* Name: Drush Alias Wildcard
*
* Description: When working on Enjoy Creativity's server, you
* can always assume the connection information is the same,
* except for the project name. Once you set up your
* ~/.ssh/config to use the hostname for the project, this
* command will let you sync the database or files directory
* between local and dev.