Skip to content

Instantly share code, notes, and snippets.

View welcoMattic's full-sized avatar
👨‍💻

Mathieu Santostefano welcoMattic

👨‍💻
View GitHub Profile
@welcoMattic
welcoMattic / imagemin.md
Last active August 15, 2024 15:58
How to fix `Error: spawn ./node_modules/jpegtran-bin/vendor/jpegtran ENOENT` error for imagemin

If you're trying to run imagemin (from grunt or gulp or anything else) on Alpine, you certainly had to meet this error :

Error: spawn /YOUR_PROJECT_PATH/node_modules/jpegtran-bin/vendor/jpegtran ENOENT or the same with optipng or gifsicle instead of jpegtran.

Here's how to solve it.

First you need to install on Alpine missing package used to compile jpegtran, gifsicle and optipng binaries. Those packages are (at least):

autoconf automake file build-base nasm musl libpng-dev zlib-dev

@welcoMattic
welcoMattic / dockerfile
Created January 12, 2018 09:47
Dockerfile php
FROM alpine:3.7
RUN apk --update upgrade && apk add bash && rm -rf /var/cache/apk/*
# Php
RUN apk --update add \
php7 \
php7-apcu \
php7-calendar \
php7-ctype \
@welcoMattic
welcoMattic / .md
Last active February 21, 2018 12:17
compare-translation-packages
symfony/translation JMSTranslationBundle lexik/LexikTranslationBundle Happyr/TranslationBundle php-translation
:---: :---: :---: :---: :---: :---:
Maintenu
Extractor (reader) ✅ fait maison
Dumper (writer) ✅ fait maison ✅ (en base de données)
GUI
@welcoMattic
welcoMattic / config.yaml
Created March 6, 2018 10:06
Disable Xdebug on CircleCi with pre-built PHP Docker image
version: 2
jobs:
build:
working_directory: ~/symfony
docker:
- image: circleci/php:7.2-fpm-node-browsers
- image: circleci/mysql:5.7-ram
# MYSQL_ALLOW_EMPTY_PASSWORD=true
# MYSQL_DATABASE=circle_test
# MYSQL_HOST=127.0.0.1