Skip to content

Instantly share code, notes, and snippets.

💭
Coding

Matthias Pigulla mpdude

💭
Coding
Block or report user

Report or block mpdude

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mpdude
mpdude / AWS-permissions.json
Created Jan 15, 2020
Build a Docker Image on GitHub Actions and push to AWS ECR
View AWS-permissions.json
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"ecr:GetDownloadUrlForLayer",
"ecr:BatchGetImage",
"ecr:CompleteLayerUpload",
@mpdude
mpdude / build.yml
Last active Jan 15, 2020
Build Docker image and push it to GPR
View build.yml
on:
push:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
@mpdude
mpdude / whiteboardCleaner.md
Created Dec 22, 2019 — forked from Ocramius/whiteboardCleaner.md
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!
View whiteboardCleaner.md

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

View keybase.md

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 / README.md
Last active Jan 12, 2020
`phpinfo` output for various PHP versions shipped with GitHub Actions
View README.md
View draft.md

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 / my-workflow.yml
Last active Sep 6, 2019
Setup a SSH deploy key so that workflow steps can fetch dependencies from private GitHub repos
View my-workflow.yml
# .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
View 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)%'
View gist:1ad1c03556d9fd4191396159b7929124
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 / symfony.xml
Created Sep 6, 2018
Symfony code style settings for PhpStorm
View symfony.xml
<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" />
You can’t perform that action at this time.