Skip to content

Instantly share code, notes, and snippets.

Avatar

Andy Postnikov andypost

View GitHub Profile
@andypost
andypost / php-xdebug-2-3.diff
Created Oct 19, 2020
php-ini change from xdebug 2 to 3
View php-xdebug-2-3.diff
; XDebug configuration
-xdebug.remote_enable = 1
-xdebug.remote_connect_back = 1
-xdebug.remote_port = 9000
xdebug.max_nesting_level = 2000
-xdebug.profiler_enable = 0
-xdebug.profiler_enable_trigger = 1
-xdebug.profiler_output_dir = "/var/log"
+xdebug.mode=debug
+;xdebug.remote_enable = 1
View gist:630e80d6532cca4f96f70e88566bc8d3
core9$ make exec0
docker exec -it -u 0:0 core9 ash
/var/www/html/web # apk add php7-xhprof-assets
fetch https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
...
OK: 116 MiB in 111 packages
/var/www/html/web # exit
core9$ make exec
View gist:37f46023f7f7e65c35ec9ab80072a17c
core8$ make t t=modules/masquerade/tests/src/Functional/MasqueradeAccessTest.php
docker exec \
-u 1000:1000 \
-e BROWSERTEST_OUTPUT_DIRECTORY=sites/simpletest/out \
core8 vendor/bin/phpunit -c core/phpunit.xml.dist --colors=always --debug -v \
modules/masquerade/tests/src/Functional/MasqueradeAccessTest.php
PHPUnit 8.5.8 by Sebastian Bergmann and contributors.
Runtime: PHP 7.4.8
Configuration: /var/www/html/web/core/phpunit.xml.dist
View alpinelinux-php-build.log
aports$ cat Makefile
.PHONY: run
all: run
IMAGE := skilldlabs/aports-build:edge
IMAGE_ALPINE=alpinelinux/docker-abuild
builder=docker run --rm -it --cap-add=SYS_PTRACE -v $(shell pwd):/mnt --network host --entrypoint='' -e APORTSDIR=/mnt -w /mnt $(IMAGE_ALPINE)
run:
View gitlab-ci-backup-git.yml
backup:git:
variables:
GIT_DEPTH: ""
GIT_STRATEGY: clone
stage: backup
environment: dev
script:
- apk add --no-cache openssh-client
- echo "${GIT_BACKUP_RSA_PUB_KEY}" > ssh_key
- chmod 0600 ssh_key
View backup.php
<?php
/**
* @file
* Backup tasks for Deployer.
*/
namespace Deployer;
/**
View search-in-types.patch
diff --git a/core/modules/help_topics/src/Plugin/Search/HelpSearch.php b/core/modules/help_topics/src/Plugin/Search/HelpSearch.php
index 61d8d67a1e..5b0ca18622 100644
--- a/core/modules/help_topics/src/Plugin/Search/HelpSearch.php
+++ b/core/modules/help_topics/src/Plugin/Search/HelpSearch.php
@@ -210,7 +210,7 @@ protected function findResults() {
->condition('i.langcode', $this->languageManager->getCurrentLanguage()->getId())
->extend(SearchQuery::class)
->extend(PagerSelectExtender::class);
- $query->innerJoin('help_search_items', 'hsi', 'i.sid = hsi.sid AND i.type = :type', [':type' => $this->getType()]);
+ $query->innerJoin('help_search_items', 'hsi', 'i.sid = hsi.sid AND i.type in (:types)', [':types' => $this->getTypes()]);
@andypost
andypost / docker-compose.yaml
Created Jun 6, 2019
Drupal 8 template for core dev + chromium
View docker-compose.yaml
version: "2.1"
services:
php:
image: skilldlabs/php:72-fpm
container_name: core8
restart: always
working_dir: /var/www/html/web
volumes:
View gist:08818adcca7d8e747d37bbd07658dd7c
mysql> SELECT
-> sum(stat_value) pages,
-> index_name,
-> sum(stat_value) * @@innodb_page_size size
-> FROM
-> mysql.innodb_index_stats
-> WHERE
-> table_name LIKE 'locales_source'
-> AND database_name = 'd8'
-> AND stat_description LIKE 'Number of pages in the index'
View .gitlab-ci.yml
image: skilldlabs/php:72
variables:
GIT_DEPTH: "3"
before_script:
- date
- pwd
stages:
You can’t perform that action at this time.