Skip to content

Instantly share code, notes, and snippets.

View tstrohmeier's full-sized avatar

Thomas Strohmeier tstrohmeier

View GitHub Profile
@tstrohmeier
tstrohmeier / App.tsx
Created June 14, 2021 17:12 — forked from tomasznguyen/App.tsx
When adding Google Maps to your react application using the library @react-google-maps/api, you run into issues when having multiple components loading a map. In this gist you'll find a component and a hook to resolve these issues and to simplify integrating the library in your application.
import React, { FC } from 'react';
import { GoogleMap } from '@react-google-maps/api';
import { useGoogleMaps } from './GoogleMapsProvider';
const containerStyle = {
width: '400px',
height: '400px'
};
const center = {
@tstrohmeier
tstrohmeier / multiple_ssh_setting.md
Last active February 25, 2021 12:48 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@tstrohmeier
tstrohmeier / add_gradle_wrapper_to_project.sh
Created May 6, 2020 03:11
Add Gradle Wrapper to a project with a Docker container
docker run --rm -u gradle -v "$PWD":/home/gradle/project -w /home/gradle/project gradle gradle wrapper
@tstrohmeier
tstrohmeier / resize_ec2_ubuntu_disk.txt
Last active June 30, 2023 11:57
Resize Ubuntu disk on EC2 after changing EBS volume size
#https://askubuntu.com/questions/24027/how-can-i-resize-an-ext-root-partition-at-runtime
growpart /dev/xvda 1 # Grows the partition; note the space
resize2fs /dev/xvda1 # Grows the filesystem
@tstrohmeier
tstrohmeier / Dockerfile
Last active November 21, 2020 14:45
Install immutability-io's vault-ethereum in a vault docker container
FROM vault:latest
# Install build tools
RUN apk add --update alpine-sdk \
&& mkdir /vault/plugins \
&& apk update \
&& apk add go git \
&& go get github.com/immutability-io/vault-ethereum \
&& go build github.com/immutability-io/vault-ethereum \
&& mv /root/go/bin/vault-ethereum /vault/plugins/vault-ethereum \
@tstrohmeier
tstrohmeier / bitbucket-pipelines.yml
Last active June 21, 2024 16:23
AWS ECS: Script for creating a new revision of a task definition and update a service
# enable Docker for your repository
options:
docker: true
pipelines:
branches:
development:
- step:
# python image with aws-cli installed
@tstrohmeier
tstrohmeier / bitbucket-pipelines.yml
Last active September 5, 2022 08:46
AWS ECS: Deploy Docker Container from Bitbucket Pipeline to AWS ECR
# enable Docker for your repository
options:
docker: true
pipelines:
branches:
development:
- step:
#python image with aws-cli installed
@tstrohmeier
tstrohmeier / txt
Created December 6, 2016 20:12
Magento Fatal Error when saving Order from Script with installed WirecardCEE Checkout Page installed
When a class of Wirecard_Checkoutpage_Model_* is called you get following Exception:
`Fatal error: Class 'WirecardCEE_QPay_PaymentType' not found in /path/app/code/core/Mage/Core/Model/Config.php on line 1354`
This is the case if you try to update a order. In the save method Magento tries to save Wirecard_Checkoutpage_Model_* before the order and the script crashes with an fatal error.
The fatal error is caused by the reason that `class_exists($className)` returns true, but `$obj = new $className($constructArguments);` is not able to find that class.
In front end this is no problem because in the event 'controller_front_init_before' the Observer Wirecard_CheckoutPage_Model_Autoloader->addAutoloader() is called which is adding the autoloader.