Skip to content

Instantly share code, notes, and snippets.

Moving bytes around.

Dalibor Karlović dkarlovi

Moving bytes around.
Block or report user

Report or block dkarlovi

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
dkarlovi / Dockerfile
Last active Mar 18, 2020
Symfony + RoadRunner + build-time cache volume Dockerfile
View Dockerfile
# syntax=docker/dockerfile:experimental
FROM alpine:3.11 AS runtime
RUN addgroup -g 82 -S www-data && \
adduser -u 82 -H -D -S -G www-data www-data && \
apk add --update --no-cache \
php7 \
php7-ctype \
php7-dom \
php7-iconv \
dkarlovi /
Last active Mar 9, 2020
Split a large XML file into several smaller XML files

How to run

saxon -s:in.xml -xsl:split.xsl name=Products size=1200
View qa.Dockerfile
# copy QA tools from a known source
COPY --from=jakzal/phpqa:alpine /tools /tools/
COPY --from=jakzal/phpqa:alpine /usr/bin/composer /tools/
RUN apk add --update --no-cache \
curl \
openssl \
dkarlovi / Dockerfile
Last active Oct 16, 2018
Setting up permissions for a (Symfony) web app on Docker
View Dockerfile
FROM alpine:3.7
# this is the "app" image, contains PHP-FPM
RUN addgroup -g 82 -S www-data && \
adduser -u 82 -H -D -S -G www-data www-data && \
# etc..
# PHP-FPM is setup to run as "www-data"
dkarlovi /
Last active May 16, 2019
GitLab's Container Registry (docker) behind Apache 2.4 reverse proxy
<VirtualHost *:80>
ServerSignature Off
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [NE,R,L]
<VirtualHost *:443>
View azure-media-services-thumbnail.php
use WindowsAzure\Blob\Models\ContainerAcl;
use WindowsAzure\Blob\Models\PublicAccessType;
// after having run a Job to create a thumbnail from our uploaded media item as seen:
// this asset contains our thumbnails
$asset = current($mediaServicesProxy->getJobOutputMediaAssets($job));
dkarlovi /
Last active Aug 29, 2015
Testing the layout

This is basically a test of using as a blogging tool.

For example

Using it might involve some headings and paragraphs.

You can’t perform that action at this time.