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
var gulp = require('gulp'); | |
var sass = require('gulp-sass'); | |
var autoprefixer = require('gulp-autoprefixer'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var livereload = require('gulp-livereload'); | |
gulp.task('sass', function () { | |
gulp.src('scss/styles.scss') | |
.pipe(sourcemaps.init()) | |
.pipe(sass()) |
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
var less = require('gulp-less'); | |
var gulp = require('gulp'); | |
var browserSync = require('browser-sync').create(); | |
var ftp = require( 'vinyl-ftp' ); | |
var gutil = require( 'gulp-util' ); | |
gulp.task('less', function () { | |
var conn = ftp.create( { | |
host: '*****.ru', | |
user: '*****', |
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
FROM php:7-fpm | |
ENV COMPOSER_VERSION 1.2.0 | |
# Recreate user with correct params | |
RUN deluser www-data && \ | |
groupadd -g 82 -r www-data && \ | |
useradd -u 82 -r -s /bin/bash -g www-data www-data && \ | |
sed -i '/^www-data/s/!/*/' /etc/shadow |
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
// clone node programmatically | |
$node = \Drupal\node\Entity\Node::load($nid); | |
if ($node) { | |
$cloned_node = $node->createDuplicate(); | |
$cloned_node->save(); | |
} |
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
// Static Image on front page | |
$form['royal_spa_hotel_settings']['pages_settings']['static_image'] = [ | |
'#type' => 'managed_file', | |
'#title' => t('Static image on front page'), | |
'#upload_validators' => [ | |
'file_validate_extensions' => ['gif png jpg jpeg'], | |
'file_validate_size' => [25600000], | |
], | |
'#theme' => 'image_widget', | |
'#preview_image_style' => 'medium', |
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 | |
/** | |
* Убирает из массива элемент по его значению | |
* @param $arr | |
* @param $value | |
*/ | |
function unset_by_value(&$arr, $value){ | |
if (($key = array_search($value, $arr)) !== false) { | |
unset($arr[$key]); | |
} |
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
[ | |
{ | |
"key": "shift+numpad2", | |
"command": "cursorDownSelect", | |
"when": "textInputFocus" | |
}, | |
{ | |
"key": "shift+numpad1", | |
"command": "cursorEndSelect", | |
"when": "textInputFocus" |
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
# /etc/systemd/system/drone.service | |
[Unit] | |
Description=Drone server | |
After=docker.service nginx.service | |
[Service] | |
Restart=always | |
ExecStart=/usr/local/bin/docker-compose -f /etc/drone/docker-compose.yml up | |
ExecStop=/usr/local/bin/docker-compose -f /etc/drone/docker-compose.yml stop |
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
"drupal/block_styles": { | |
"Notice: Undefined index after placing block": "https://www.drupal.org/files/issues/2642010-7-fix-block-notice.patch", | |
"Notice: Undefined index: #id in block_styles_theme_suggestions_block_alter() ": "https://www.drupal.org/files/issues/notice_undefined-2725167-3.patch", | |
"array flip issue": "https://www.drupal.org/files/issues/2018-06-23/2890458_fix_array_flip.patch" | |
}, | |
"drupal/ds": { | |
"Warning: Invalid argument supplied for foreach() in /ds/ds.module on line 504": "https://www.drupal.org/files/issues/2018-04-21/invalid_argument_in_ds_module-2904575-7.patch" | |
}, | |
"drupal/owlcarousel": { | |
"Theme hook owl not found (solved)": "https://www.drupal.org/files/issues/drupal-8_owlcarousel_theme_hook_owl_not_found_2917939-2.patch" |
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
export CUSTOM_BARRIO=$1 # change this to your custom theme_name | |
cp -r ../contrib/bootstrap_sass $CUSTOM_BARRIO | |
cd $CUSTOM_BARRIO | |
for file in *bootstrap_sass.*; do mv $file ${file//bootstrap_sass/$CUSTOM_BARRIO}; done | |
for file in config/*/*bootstrap_sass.*; do mv $file ${file//bootstrap_sass/$CUSTOM_BARRIO}; done | |
grep -Rl bootstrap_sass .|xargs sed -i'' -e "s/bootstrap_sass/$CUSTOM_BARRIO/" | |
grep -Rl bootstrap_barrio .|xargs sed -i'' -e "s/bootstrap_barrio/$CUSTOM_BARRIO/" |
OlderNewer