This gist is a follow-up to this Lando issue, updated for Docker Composer and Windows (but might also help macOS and Linux users).
This file contains hidden or 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 run -p 6080:80 -v /dev/shm:/dev/shm dorowu/ubuntu-desktop-lxde-vnc | |
``` | |
Browse to http://127.0.0.1:6080/ | |
In the VNC UI, run the LXTerminal. Paste these commands to install a given version of Firefox. Set `FF_VERS` to the release you want. See available releases at http://releases.mozilla.org/pub/firefox/releases | |
``` | |
apt-get update && apt-get install wget |
This file contains hidden or 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
filter: | |
paths: | |
- 'module/*' | |
tools: | |
php_mess_detector: | |
config: | |
code_size_rules: { cyclomatic_complexity: true, npath_complexity: true, excessive_method_length: true, excessive_class_length: true, excessive_parameter_list: true, excessive_public_count: true, too_many_fields: true, too_many_methods: true, excessive_class_complexity: true } | |
design_rules: { number_of_class_children: true, depth_of_inheritance: true, coupling_between_objects: true } | |
unused_code_rules: { unused_local_variable: true, unused_private_method: true, unused_formal_parameter: true } |
This file contains hidden or 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
/** | |
* Implements hook_process(). | |
*/ | |
function MYTHEMEORMODULE_process(&$variables, $hook) { | |
// Seems legit. | |
// @see laborange2_theme_registry_alter(). | |
if (false === strpos($hook, 'advanced_forum')) { | |
// This one is a stupid variable mis-use and typo from advanced_forum. | |
if (!empty($variables['theme_hook_suggestion']) && false !== strpos($variables['theme_hook_suggestion'], 'advanced_forum')) { | |
// Do not override the 'theme_hook_suggestion' other than advanced |
This file contains hidden or 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 | |
* Holds relevant functions for paragraph field formatters. | |
*/ | |
/** | |
* Implements hook_field_formatter_info(). | |
*/ |
This file contains hidden or 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 | |
// Social share links | |
$links = array(); | |
$share_url = url('node/'.$node->nid, array('absolute' => TRUE)); | |
$links['facebook'] = array( | |
'href' => 'https://www.facebook.com/sharer/sharer.php?u='.$share_url, | |
'title' => t("Facebook"), | |
'attributes' => array( | |
'data-popup-width' => 700, |
This file contains hidden or 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
[alias] | |
a = add | |
aa = add -A | |
ac = "!f() { curl $@ | git apply --index; }; f" | |
ac3 = "!f() { curl $@ | git apply -3 --index; }; f" | |
amend = commit --amend -C HEAD | |
ap = add -p | |
app = apply --index | |
br = branch | |
cb = checkout -b |
This file contains hidden or 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 | |
/** | |
* Implements hook_drush_command(). | |
*/ | |
function custom_local_drush_command() { | |
$items['files-fix-permissions'] = array( | |
'description' => 'Fix file permissions', | |
'options' => array( | |
'owner' => "The name of the user to assign ownership of all files with chown(). Defaults to \$USER.", |