Skip to content

Instantly share code, notes, and snippets.

View welcoMattic's full-sized avatar

Mathieu Santostefano welcoMattic

View GitHub Profile
@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
@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 / 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 / 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 / keybase.md
Created February 10, 2017 15:07
keybase.md

Keybase proof

I hereby claim:

  • I am welcomattic on github.
  • I am welcomattic (https://keybase.io/welcomattic) on keybase.
  • I have a public key ASDMDqgYSYolrjpizquBaH7ivQg2SqEyXQlyCNNf71J0AAo

To claim this, I am signing this object:

@welcoMattic
welcoMattic / export.js
Last active January 2, 2024 09:28 — forked from HoLyVieR/gist:1616679
Gameplay - Export SAV file
// Getting the data //
var filename = "ROM_NAME";
var rawData = base64ToArray(findValue("B64_SRAM_" + filename)).map(function (a) { return String.fromCharCode(a); }).join("");
var tmpLink = document.createElement("a");
tmpLink.href = "data:application/force-download," + escape(rawData);
document.body.appendChild(tmpLink);
### Keybase proof
I hereby claim:
* I am welcoMattic on github.
* I am welcomattic (https://keybase.io/welcomattic) on keybase.
* I have a public key whose fingerprint is 9639 1EC6 EC65 5CEA 069B 9431 3120 61B3 21D1 CA26
To claim this, I am signing this object:
@welcoMattic
welcoMattic / macosx-install-php-oracle-oci8.md
Last active July 13, 2016 14:49 — forked from gido/macosx-install-php-oracle-oci8.md
install Oracle PHP Extension (oracle OCI8) - instantclient for Mac OS 10.8 - homebrew environnement

Installation

This procedure is tested on Mac OS X 10.8 with Developpers tools installed (xCode).

PHP 5.4 installed with Homebrew.

Update: I wrote a blog post about this.

Preparation

Download the following files from Oracle website (yes, you need to create an account and accept terms):

@welcoMattic
welcoMattic / README.md
Last active May 27, 2016 07:50 — forked from agnoster/README.md
welcomattic ZSH theme (fork from agnoster)

welcomattic.zsh-theme

Disclaimer : Heavily inspired from agnoster's theme - https://gist.github.com/3712874

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
var gulp = require('gulp');
var replace = require('gulp-replace');
var info = require('./package.json');
var args = require('yargs').argv;
var exec = require('child_process').exec;
// $ gulp bump -v x.x.x
gulp.task('bump', function () {
gulp.src([
'package.json'