Skip to content

Instantly share code, notes, and snippets.

@andypost
andypost / Makefile
Last active December 17, 2023 18:43
drupal 10 core contributor docker kickstarter
.PHONY: up upx log down exec exec0 h t
CUID := $(shell id -u)
CGID := $(shell id -g)
IMAGEPHP := skilldlabs/php:8
all: | exec
up:
docker run --rm --name core9 \
@andypost
andypost / docker-compose.yaml
Created October 6, 2023 23:52
Drupal 10 core dev
version: "3.4"
services:
php:
# image: drupalci/php-8.2-apache:production
image: skilldlabs/php:82-unit-dev
# image: skilldlabs/php:83-unit-dev
container_name: core
restart: always
@andypost
andypost / gist:bfeb0f21637a0a2463c00151eb429e69
Created September 6, 2023 21:34
Build of unit 1.31.0 using clang16
$ docker run --rm -it -u 0:0 --cap-add=SYS_PTRACE --privileged --platform=linux/aarch64 --network host --pull=always -v /data/nd/aports:/mnt -e APORTSDIR=/mnt -w /mnt --entrypoint='' alpinelinux/alpine-gitlab-ci:latest-aarch64 /bin/ash
latest-aarch64: Pulling from alpinelinux/alpine-gitlab-ci
...
Digest: sha256:b2020e43f7d89e9477823e427ba4b11e48db41b9a2987acf667e1b56d4f767b1
Status: Downloaded newer image for alpinelinux/alpine-gitlab-ci:latest-aarch64
/mnt # cd community/unit
/mnt/community/unit # apk upgrade
fetch https://dl-cdn.alpinelinux.org/alpine/edge/main/aarch64/APKINDEX.tar.gz
(1/2) Upgrading pkgconf (2.0.2-r0 -> 2.0.3-r0)
(2/2) Upgrading nghttp2-libs (1.55.1-r0 -> 1.56.0-r0)
@andypost
andypost / docker-compose.yaml
Last active August 8, 2022 05:49
Drupal 8 template for core dev + chromium
version: "2.1"
services:
php:
image: skilldlabs/php:8-fpm
container_name: core8
restart: always
working_dir: /var/www/html/web
volumes:
@andypost
andypost / bootstrap_toolbox.yml
Last active June 12, 2022 14:49
Ansible playbook to bootstrap python for coreOS
- name: bootstrap python with toolbox
hosts: coreos
gather_facts: False
vars:
ansible_bin: /home/coreos/bin
ansible_python_interpreter: "{{ansible_bin}}/python"
python_shim: |
#!/bin/bash
toolbox -q --bind=/home:/home python "$@"

Installing Coder Sniffer https://www.drupal.org/node/1419988

Install

composer global require drupal/coder squizlabs/php_codesniffer

Init

~/.composer/vendor/bin/phpcs --config-set installed_paths ~/.composer/vendor/drupal/coder/coder_sniffer

@andypost
andypost / .gitconfig
Last active December 21, 2021 10:42
My git config
[color]
ui = auto
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
whitespace = red reverse
[core]
whitespace=fix,-indent-with-non-tab,-indent-with-tab,trailing-space,cr-at-eol
@andypost
andypost / mydate.info.yml
Created December 11, 2021 20:13
Views date fielter plugin alter
name: My date
description: "Overrides core date views filter"
type: module
package: "Views"
core_version_requirement: '>=8.8.0'
@andypost
andypost / Makefile
Created September 1, 2021 13:18
Alpinelinux docker CI images for each arch
.PHONY: run
all: x86_64
IMAGE_ALP=alpinelinux/alpine-gitlab-ci:latest-
builder = docker run --rm -it --network host \
--cap-add=SYS_PTRACE --privileged \
--platform=linux/$(or ${2}, ${1}) \
-v $(shell pwd):/mnt -e APORTSDIR=/mnt -w /mnt \
@andypost
andypost / php-xdebug-2-3.diff
Created October 19, 2020 15:37
php-ini change from xdebug 2 to 3
; 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