Skip to content

Instantly share code, notes, and snippets.

View mklooss's full-sized avatar

Mathis Klooß mklooss

View GitHub Profile
@mklooss
mklooss / grub-install.sh
Created May 5, 2021 13:28
install grub to every device!
#!/bin/bash
find /dev/ -maxdepth 1 \( -name 'sd[a-z]' -o -name 'nvme[0-9]n[0-9]' \) -exec grub-install "{}" \;
#/bin/bash
# running an test imap server for testing
docker run \
--name imap-devel \
-p 127.0.0.1:1143:143/tcp \
-p 127.0.0.1:1993:993/tcp \
-e MAILNAME=mail.example.com \
-e MAIL_ADDRESS=service@example.com \
@mklooss
mklooss / magento1_fix_auto_increment.sql
Created December 3, 2020 13:19
Magento1 issues with out of range value_id
DELETE FROM catalog_product_entity_datetime WHERE entity_id NOT IN (SELECT entity_id FROM catalog_product_entity);
DELETE FROM catalog_product_entity_datetime WHERE attribute_id NOT IN (SELECT attribute_id FROM eav_attribute);
DELETE FROM catalog_product_entity_decimal WHERE entity_id NOT IN (SELECT entity_id FROM catalog_product_entity);
DELETE FROM catalog_product_entity_decimal WHERE attribute_id NOT IN (SELECT attribute_id FROM eav_attribute);
DELETE FROM catalog_product_entity_int WHERE entity_id NOT IN (SELECT entity_id FROM catalog_product_entity);
DELETE FROM catalog_product_entity_int WHERE attribute_id NOT IN (SELECT attribute_id FROM eav_attribute);
DELETE FROM catalog_product_entity_text WHERE entity_id NOT IN (SELECT entity_id FROM catalog_product_entity);
@mklooss
mklooss / 1_magento_prepare_migration.md
Last active December 23, 2020 09:43
1_magento_prepare_migration.md

Get Attribute with unkown classes:

SELECT
    ea.attribute_code,
    eet.entity_type_code,
    ea.source_model
FROM eav_attribute AS ea JOIN eav_entity_type AS eet ON(eet.entity_type_id=ea.entity_type_id)
WHERE source_model IS NOT NULL
AND source_model NOT IN (
@mklooss
mklooss / pagespeed-requirement.vcl
Last active October 5, 2020 20:00 — forked from section-io-gists/pagespeed-requirement.vcl
Using the PageSpeed module alongside Varnish, you will need to configure Varnish to handle PageSpeed optimizations.
# Note: You will want to add the snippet: `include "pagespeed-requirement.vcl";` above your `vcl_recv` in the default.vcl file.
sub vcl_recv {
call pagespeed_capability_detection;
}
# Function derived from requirements here https://modpagespeed.com/doc/downstream-caching#ps-capabilitylist
# Additional detection logic for crawlers, tablet and mobile devices.
sub pagespeed_capability_detection {
if (req.http.User-Agent ~ "(?i)Chrome/[3][2-9]+\.|Chrome/[4-9][0-9]+\.|Chrome/[0-9]{3,}\.|Firefox/([6-9][5-9]|\d{3,})\.") {
@mklooss
mklooss / build-chroot-dir.sh
Last active September 14, 2020 05:46
chroot ssh builder
# Chroot Builder
cp -RLv /etc/ca-certificates /home/testing/etc/
cp -RLv /etc/ssl /home/testing/etc/
cp -Lv -vf /etc/{passwd,group,hostname,resolv.conf} /home/testing/etc/
LBIN="bash ls cp mc mv pwd dircolors mkdir rm chmod id patch diff awk rsync whoami ssh git git-receive-pack git-shell git-upload-archive git-upload-pack openssl hostname wget curl nice gzip gunzip xz unxz zip unzip lsof mysql mysqldump sed tar less ping mtr nslookup dig jpegoptim jpegtran guetzli cwebp optipng pngquant gif2webp zopflipng"
for f in $LBIN; do
WHICH=$(which $f)
@mklooss
mklooss / magento2-redis.sh
Last active February 17, 2021 12:19
magento2-redis.sh
bin/magento setup:config:set \
--cache-backend=redis \
--cache-backend-redis-server=127.0.0.1 \
--cache-backend-redis-port=6379 \
--cache-backend-redis-db=1
bin/magento setup:config:set --page-cache=redis \
--page-cache-redis-server=127.0.0.1 \
--page-cache-redis-port=6379 \
--page-cache-redis-db=2
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project clone-depth="1" name="fusion3-common/proprietary_vendor_sony" path="vendor/sony" remote="github" />
<project name="fusion3-common/android_device_sony_pollux" path="device/sony/pollux" remote="github" />
<project name="fusion3-common/android_device_sony_pollux-common" path="device/sony/pollux-common" remote="github" />
<project name="fusion3-common/android_device_sony_fusion3-common" path="device/sony/fusion3-common" remote="github" />
<project name="LineageOS/android_device_sony_common" path="device/sony/common" remote="github" />
<project name="fusion3-common/android_kernel_sony_apq8064" path="kernel/sony/apq8064" remote="github" />
<project name="LineageOS/android_hardware_sony_DASH" path="hardware/sony/DASH" remote="github" />
<project name="LineageOS/android_hardware_sony_thermanager" path="hardware/sony/thermanager" remote="github" />
@mklooss
mklooss / remove_Temando_Shipping.sql
Last active February 13, 2023 19:09
Remove Temando_Shipping from Magento2!
DELETE FROM eav_attribute WHERE attribute_code IN('ts_dimensions_length', 'ts_dimensions_width', 'ts_dimensions_height', 'ts_packaging_type', 'ts_packaging_id', 'ts_country_of_origin', 'ts_hs_code');
DROP TABLE temando_order;
DROP TABLE temando_quote_collection_point;
DROP TABLE temando_collection_point_search;
DROP TABLE temando_order_collection_point;
DROP TABLE temando_quote_pickup_location;
DROP TABLE temando_pickup_location_search;
DROP TABLE temando_order_pickup_location;
@mklooss
mklooss / 0_Building_Pagespeed_Static_File_for_NGINX.txt
Last active May 5, 2020 09:12
Build NGINX with Pagespeed Modul
https://github.com/apache/incubator-pagespeed-ngx/wiki/Building-PSOL-From-Source