Skip to content

Instantly share code, notes, and snippets.

@sprightly
sprightly / 01 Create a debug version of the docker image.sh
Created February 14, 2020 14:11 — forked from sh41/01 Create a debug version of the docker image.sh
Debugging segmentation faults in PHP in a docker container.
git clone git@github.com:docker-library/php.git docker-library-php
## Go to the specific version you're interested in
cd docker-library-php/7.1/fpm/alpine
## Edit the .Dockerfile.
## Change
## ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data
## to
## ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --enable-debug
## Comment out or delete:
@sprightly
sprightly / console.sql
Last active April 4, 2017 09:10 — forked from x86demon/Campaign + Leads + Opportunities.sql
OroCRM generate carts for magento bundle at postgres
CREATE OR REPLACE FUNCTION generateMagentoCarts(startId INT, amount INT)
RETURNS INT AS $$
DECLARE
cartId INTEGER;
orderId INTEGER;
workflowItemId INTEGER;
secondWorkflowItemId INTEGER;
BEGIN
FOR i IN startId .. amount
LOOP
@sprightly
sprightly / phpbrew-fpm
Last active December 27, 2017 07:28 — forked from kivlara/php5-fpm
PHP-FPM as service with PHPBrew installed under vagrant user
#!/bin/sh
### BEGIN INIT INFO
# Provides: php-fpm php5-fpm
# Required-Start: $remote_fs $network
# Required-Stop: $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts php5-fpm
# Description: Starts PHP5 FastCGI Process Manager Daemon
### END INIT INFO