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 / 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",
@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 / 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

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 / 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 / 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)%'
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
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PublishConfigData" serverName="wf-development-vm">
<serverData>
<paths name="wf-development-vm">
<serverdata>
<mappings>
<mapping deploy="/var/www" local="$PROJECT_DIR$/../" web="/" />
</mappings>
</serverdata>
#!/bin/bash -e
pushd . > /dev/null
INTERPRETER=/usr/bin/php
while [ "`pwd`" != "/" ]; do
if [ -x ./bin/php ]; then
INTERPRETER=`pwd`/bin/php
break
fi
cd ..
done
@mpdude
mpdude / srsd
Last active May 21, 2018 20:36
init script for srsd
#!/bin/bash
### BEGIN INIT INFO
# Provides: srsd
# Required-Start: $networking $local_fs $remote_fs $syslog
# Required-Stop: $networking $local_fs $remote_fs $syslog
# Should-Start:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: SRS daemon