Skip to content

Instantly share code, notes, and snippets.

View mpdude's full-sized avatar
💭
Coding

Matthias Pigulla mpdude

💭
Coding
View GitHub Profile
@mpdude
mpdude / symfony.xml
Created September 6, 2018 20:30
Symfony code style settings for PhpStorm
<code_scheme name="Project" version="173">
<option name="RIGHT_MARGIN" value="150" />
<PHPCodeStyleSettings>
<option name="ALIGN_KEY_VALUE_PAIRS" value="true" />
<option name="ALIGN_PHPDOC_PARAM_NAMES" value="true" />
<option name="ALIGN_PHPDOC_COMMENTS" value="true" />
<option name="COMMA_AFTER_LAST_ARRAY_ELEMENT" value="true" />
<option name="PHPDOC_BLANK_LINES_AROUND_PARAMETERS" value="true" />
<option name="LOWER_CASE_BOOLEAN_CONST" value="true" />
<option name="LOWER_CASE_NULL_CONST" value="true" />
diff --git a/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php b/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php
index 571f16232..bf823e56d 100644
--- a/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php
+++ b/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php
@@ -87,10 +87,10 @@ class MysqliStatement implements \IteratorAggregate, Statement
protected $_values = [];
/**
- * Contains values from bindValue() that need to be sent
+ * Contains streams passed to bindValue() that need to be sent
@mpdude
mpdude / secrets.yaml
Created April 6, 2019 13:09 — forked from nicolas-grekas/secrets.yaml
secrets.yaml
parameters:
env(SECRETS_FILE): .secrets.php
services:
# default configuration for services in *this* file
_defaults:
autowire: true # Automatically injects dependencies in your services.
autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
bind:
$someSecret: '%env(key:KEY3:require:SECRETS_FILE)%'
@mpdude
mpdude / my-workflow.yml
Last active August 25, 2023 13:00
Setup a SSH deploy key so that workflow steps can fetch dependencies from private GitHub repos
# .github/workflows/my-workflow.yml
# ... other config here
jobs:
build:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- name: Setup SSH Keys and known_hosts
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
@mpdude
mpdude / draft.md
Created September 25, 2019 19:18

Question on how to best build Docker images

Initial situation

In most of my projects I need to run a few steps after I checkout the code from version control and before I can actually use (or work on) it. Examples include

  • run composer, npm, yarn, ... to fetch dependencies
  • run grunt, gulp or similar front-end build pipelines
  • run some legacy code generation tools 🙀
@mpdude
mpdude / README.md
Last active May 2, 2021 02:42
`phpinfo` output for various PHP versions shipped with GitHub Actions

Keybase proof

I hereby claim:

  • I am mpdude on github.
  • I am mpdude (https://keybase.io/mpdude) on keybase.
  • I have a public key ASAdscxl5DfSh-Nrq8J95UjzAg6e7bIgoSGKTdOzeB_8VAo

To claim this, I am signing this object:

@mpdude
mpdude / whiteboardCleaner.md
Created December 22, 2019 13:39 — forked from Ocramius/whiteboardCleaner.md
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@mpdude
mpdude / build.yml
Last active January 15, 2020 16:57
Build Docker image and push it to GPR
on:
push:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
@mpdude
mpdude / AWS-permissions.json
Created January 15, 2020 21:42
Build a Docker Image on GitHub Actions and push to AWS ECR
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"ecr:GetDownloadUrlForLayer",
"ecr:BatchGetImage",
"ecr:CompleteLayerUpload",