Skip to content

Instantly share code, notes, and snippets.


Mathis Klooß mklooss

View GitHub Profile
View 0_Building_Pagespeed_Static_File_for_NGINX.txt
mklooss / magento2.3-send-mail-with-attachments.php
Created Mar 26, 2020
Magento 2.3 Mail Transport add Attachments
View magento2.3-send-mail-with-attachments.php
$emailData = [ ... ];
/* @var $transportBuilder \Magento\Framework\Mail\Template\TransportBuilder */
/* @var $transport \Magento\Framework\Mail\Transport */
$transport = $transportBuilder->getTransport();
if (isset($emailData['attachments']))
mklooss / 1_Readme.txt
Created Feb 16, 2020
Mosquitto issues with permissons
View 1_Readme.txt
My Setup is using mosquitto[1] with homeassistant[2]
after some times my homeassistant does not update the mqtt Devices and can not get informations from mqtt.
so i've implemented in homeassitant an automatisim which send the current unixtimestamp to the mqtt network in icinga2[3] ([4]).
i've added this check_mqtt[4] because i did know when this issues triggert.
The Result was directly in mosquitto[1], so the password file can not be reloaded - see 2_mosquitto.log (on Reboot everything is fine).
so i changed the permission of this file and everythings works as excepted:
chmod 640 /etc/mosquitto/passwords
mklooss / magento-runRules.php
Last active Dec 2, 2019
Magento Apply all Rules
View magento-runRules.php
if (php_sapi_name() != 'cli')
ini_set('display_errors', 1);
mklooss /
Created Sep 17, 2019
icinga2 - docker graphite simple
docker run -d --name graphite \
--restart=always \
-p \
-p \
-p \
-p \
-p \
-v /opt/docker/graphite/conf:/opt/graphite/conf \
mklooss /
Last active Sep 12, 2019
Build HHVM on Debian Stretch


rm -rf /opt/hhvm

apt-get build-dep uw-imap -y
apt-get -y install libssl1.0-dev
apt-get -y install libgd2-xpm-dev (or the next one!)
apt-get -y install libgd-dev
apt-get -y install autoconf automake binutils-dev bison build-essential \
    cmake debhelper g++ gawk git gperf libboost-context-dev \
View get-array-of-domains.php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$list = curl_exec($ch);
$list = str_replace("\r", "", $list);
View 0_readme-rpi4-debian-kernel-build.txt
thanks to :)
install first:
used system debian buster amd64 (4 cores)
~# apt-get install binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu g++-aarch64-linux-gnu bison flex
mklooss / nginx.conf
Last active Aug 2, 2019
nginx magento configuration for API Calls
View nginx.conf
location /api {
rewrite ^/api/rest /api.php?type=rest last;
rewrite ^/api/v2_soap /api.php?type=v2_soap last;
rewrite ^/api/soap /api.php?type=soap last;
mklooss / gist:4528773
Last active Mar 12, 2019
Magento - Delete in Collection in one request
View gist:4528773
class Something_Asdf_Model_Resource_Halma_Collection
extends Mage_Core_Model_Resource_Db_Collection_Abstract
* delete all the entities in the collection
* @return $this
public function delete()