Skip to content

Instantly share code, notes, and snippets.

View thobaier's full-sized avatar
⏱️
relaxing

Thomas Baier thobaier

⏱️
relaxing
  • Halle (Saale), Germany
View GitHub Profile

Stripe Payment Link Tracking mit GTM / GA4

Ziel

Conversion-Tracking ohne eigenes Backend, ohne Webhook und ohne Embedded Checkout.

Flow:

Squarespace Landingpage
const {SES} = require('aws-sdk');
/**
* Configuration
*/
const configuration = {
localRun: process.env.LOCALSTACK === 'true',
ses: {
region: process.env.SES_REGION,
endpoint: process.env.SES_ENDPOINT,
@thobaier
thobaier / Dockerfile
Last active December 13, 2018 16:20
Alpine Dockerfile hints
###################
## PHP extensions #
###################
### install xdebug
RUN apk add --update --no-cache $PHPIZE_DEPS && pecl install xdebug-2.5.0 && docker-php-ext-enable xdebug
### install mcrypt
RUN apk add --update --no-cache libintl icu icu-dev && docker-php-ext-install intl
@thobaier
thobaier / Makefile
Created November 15, 2018 08:14
Makefile hints
# <!-- Build comments from file (selfdocumented makefile) --> #
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
@sed -n 's/^##//p' $<
# <!-- default target --> #
.DEFAULT_GOAL := help
# <!-- catch all target --> #
.DEFAULT:
@thobaier
thobaier / dependency-check.sh
Created November 14, 2018 19:45
simple bash script to check installed dependencies
#!/usr/bin/env bash
# check ($PATH) dependencies
dependencies="git docker aws-cli mysql mysql-client mysqladmin"
dependencies_failed=()
for dependency in $dependencies
do
if ! [[ -x "$(command -v $dependency)" ]]; then
dependencies_failed+="$dependency "
@thobaier
thobaier / README.md
Last active October 2, 2018 12:44
A tiny test for the YUI-Compressor running in a java docker container

Tiny test for the ui compressor

put the compressor and your files in "data"

bring up the project

docker-compose up

test the compressor

@thobaier
thobaier / codesniffer-phpstorm.md
Last active August 20, 2018 14:06
Setup Codesniffer in PHP-Storm

Setup Codesniffer in PHP-Storm

require CS globally

composer global require "squizlabs/php_codesniffer=*"

setup CS

File | Settings | Languages & Frameworks | PHP | Code Sniffer
--> Configuration: set path to codesniffer (/home/user/{username}/.composer/vendor/bin/phpcs)

@thobaier
thobaier / orm.yml
Last active August 20, 2018 14:05
Doctrine map vendor model
#####################
## map vendor model #
#####################
# define mappings in config
PaymethodsWirecardBundle:
type: yml
dir: Resources/config/doctrine
prefix: "Wirecard\\PaymentSdk"
is_bundle: true
@thobaier
thobaier / cookie.js
Created June 5, 2018 17:51
[Javascript] Cookie
@thobaier
thobaier / Dockerfile
Last active May 18, 2018 09:40
[Docker] Data only container with busybox
FROM busybox
RUN mkdir /application
COPY . /application
VOLUME /application