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
# add on active server block | |
location ~* /(files|files-private|tmp)/.*\.php$ { | |
deny all; | |
} |
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 | |
// thanks Dan - http://www.mediacurrent.com/blog/eight-insights-and-useful-snippets-d8-rest-module | |
/** @file | |
* Contains \Drupal\views_ext\Plugin\views\style\SerializerCount. | |
*/ | |
namespace Drupal\views_ext\Plugin\views\style; | |
use Drupal\Core\Cache\Cache; | |
use Drupal\Core\Cache\CacheableDependencyInterface; |
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
import { Directive, HostListener } from '@angular/core'; | |
@Directive({ | |
selector: '[appNoDblClickMat]' | |
}) | |
export class NoDblClickDirectiveMat { | |
constructor() { } | |
@HostListener('click', ['$event']) |
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
/** | |
* Update select list (html select) | |
*/ | |
updateValueList(event, cell, rowIndex, row) { | |
var data = { | |
//"nid": [{"value": row.nid}], | |
"type":[{"target_id":"request_material"}], | |
"field_req_material_state": [{"value": event.target.value}] | |
}; | |
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
# located at /etc/netplan/ | |
# $ sudo netplan apply | |
network: | |
version: 2 | |
renderer: networkd | |
ethernets: | |
enp5s0f0: | |
dhcp4: false | |
bridges: | |
br0: |
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
#!/bin/bash | |
while read oldrev newrev ref | |
do | |
branch=`echo $ref | cut -d/ -f3` | |
if [[ "master" == "$branch" ]]; then | |
git --work-tree=/var/www/vhosts/bms2/ checkout -f $branch | |
echo 'Changes pushed master to bms2' |
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 FileIdFieldFormatter.php | |
* | |
* field formatter id for file and image | |
* | |
*/ | |
namespace Drupal\custom_fs\Plugin\Field\FieldFormatter; |
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 | |
namespace Drupal\exp_fs\Plugin\rest\resource; | |
use Drupal\Core\Session\AccountProxyInterface; | |
use Drupal\rest\ModifiedResourceResponse; | |
use Drupal\rest\Plugin\ResourceBase; | |
use Drupal\rest\ResourceResponse; | |
use Psr\Log\LoggerInterface; | |
use Symfony\Component\DependencyInjection\ContainerInterface; |
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
$view = new view(); | |
$view->name = 'files'; | |
$view->description = ''; | |
$view->tag = 'default'; | |
$view->base_table = 'file_managed'; | |
$view->human_name = 'Files'; | |
$view->core = 7; | |
$view->api_version = '3.0'; | |
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ |
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 | |
namespace Drupal\tools_ext\Controller; | |
use Drupal\Core\Controller\ControllerBase; | |
use Symfony\Component\DependencyInjection\ContainerInterface; | |
use Drupal\language\ConfigurableLanguageManagerInterface; | |
use Drupal\Core\Session\AccountProxyInterface; | |
use Drupal\Core\Entity\EntityRepositoryInterface; | |
use Drupal\Core\Entity\EntityTypeManagerInterface; |
OlderNewer