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
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
WORKDIR /app
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
dkarlovi / README.md
Last active Mar 9, 2020
Split a large XML file into several smaller XML files
View README.md

How to run

saxon -s:in.xml -xsl:split.xsl name=Products size=1200
View qa.Dockerfile
ARG BUILD_VERSION
FROM example.com/app:${BUILD_VERSION}
# 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
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"
WORKDIR /app
@dkarlovi
dkarlovi / registry.example.com.conf
Last active May 16, 2019
GitLab's Container Registry (docker) behind Apache 2.4 reverse proxy
View registry.example.com.conf
<VirtualHost *:80>
ServerName registry.example.com
ServerSignature Off
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [NE,R,L]
</VirtualHost>
<VirtualHost *:443>
View azure-media-services-thumbnail.php
<?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:
// http://stackoverflow.com/questions/31070909/how-to-get-a-thumbnail-from-a-video-on-azure-media-services
// this asset contains our thumbnails
$asset = current($mediaServicesProxy->getJobOutputMediaAssets($job));
@dkarlovi
dkarlovi / README.md
Last active Aug 29, 2015
Testing the gist.io layout
View README.md

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

For example

Using it might involve some headings and paragraphs.

You can’t perform that action at this time.