Skip to content

Instantly share code, notes, and snippets.

@Schrank
Schrank / Dockerfile
Created Mar 17, 2021
This is a running docker container which can run MY (inherited) gulp setup I have no clue about
View Dockerfile
FROM node:12-buster
MAINTAINER Fabian Blechschmidt
WORKDIR /opt/magento/skin/frontend/rwd/theme
VOLUME ["/opt"]
CMD ["gulp", "default"]
@Schrank
Schrank / index.js
Created Mar 4, 2021
180days of entries and show unbillable with hourly rate 0
View index.js
/*
Keep in mind that you can't use browser specific calls. Use following calls
--Loading httpContents--
loadURL(method,url,headers);
--Logging to the Console--
log(value);
--Base64--
@Schrank
Schrank / test.php
Created Jul 12, 2020
For some reason, the decryption doesn't work with this key - why?
View test.php
<?php
spl_autoload_register(function ($className) {
$path = explode('\\', $className);
if (array_shift($path) == 'phpseclib') {
return require 'magento/lib/' . str_replace('\\', DIRECTORY_SEPARATOR, $className) . '.php';
}
});
use phpseclib\Crypt\Random;
@Schrank
Schrank / Untitled 1.csv
Created Jun 18, 2020
Export magento products as CSV from database (Build with Libre Office)
View Untitled 1.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 39 columns, instead of 27. in line 2.
"attribute_id","attribute_code","attribute_type",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
68,"cost","decimal","=CONCATENATE(B2;""_default.value AS "";B2;""_default,"";B2;""_store.value AS "";B2;""_store,"")","LEFT JOIN catalog_product_entity_","=C2"," AS ","=B2","_default ON ","=B2","_default",".store_id = 0 AND ","=B2","_default.entity_id =","p.entity_id AND ","=B2","_default.attribute_id = ","=A2"," LEFT JOIN catalog_product_entity_","=C2"," AS ","=B2",,"_store ON ","=B2","_store.","store_id = 1 AND ",,"=B2",,"_store.entity_id =","p.entity_id AND ",,,"=B2","_store.attribute_id = ","=A2",,"=TEXTJOIN("""";1;E2:AL2)"
64,"price","decimal","=CONCATENATE(B3;""_default.value AS "";B3;""_default,"";B3;""_store.value AS "";B3;""_store,"")","LEFT JOIN catalog_product_entity_","=C3"," AS ","=B3","_default ON ","=B3","_default",".store_id = 0 AND ","=B3","_default.entity_id =","p.entity_id AND ","=B3","_default.attribute_id = ","=A3"," LEFT JOIN catalog_product_entity_","=C3"," AS ","=B3",,"_store ON ","=B3","_store.",
@Schrank
Schrank / index.html
Created May 30, 2020
Get all Earthdawn dices for level 3-20
View index.html
<!doctype html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Earthdawn dices</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
@Schrank
Schrank / .env.local
Last active Oct 21, 2019
Smyfony4 Swift SMTP configuration for Uberspace
View .env.local
MAILER_PASSWORD=12345
View Observer.php
/**
* Set prices and image configuration
*
* @param Varien_Event_Observer $observer
*/
public function salesQuoteCollectTotalsBefore(Varien_Event_Observer $observer)
{
/* @var $quote Mage_Sales_Model_Quote */
$quote = $observer->getQuote();
foreach ($quote->getAllItems() as $quoteItem) {
@Schrank
Schrank / matrixrate-php7.2.patch
Created Feb 28, 2018
Webshopapps Productmatrix PHP 7.2 compatible
View matrixrate-php7.2.patch
Index: www/vendor/webshopapps/productmatrix/app/code/community/Webshopapps/Productmatrix/Model/Mysql4/Carrier/Productmatrix.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/vendor/webshopapps/productmatrix/app/code/community/Webshopapps/Productmatrix/Model/Mysql4/Carrier/Productmatrix.php (date 1519796135000)
+++ www/vendor/webshopapps/productmatrix/app/code/community/Webshopapps/Productmatrix/Model/Mysql4/Carrier/Productmatrix.php (date 1519796135000)
@@ -1715,7 +1715,7 @@
$weight = 0;
$qty = 0;
View id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCjwYMG6aXe6qSEZR+MAP/IxkhV0iFyZdtAMYbp23XsIbf/gatLnlafqmuORT0SxRVwAr1oI920n9F1iL06WTmEnVF3ncC8ISPEPrPzLzMjbRQhF6EjW9ypxNcjW/kEqzz6ci6fY6o0ds/+0i12IJfxFaWVgEGm5Osyd3u3810GW9coaWDoscDjEHhhVJDGbypXRyc7w7ZWPthFeRykUtSHG4WchQ6AwRZwo1ajfWPedkSQA4CcOEhqxiQN/Lv1aMvI14JH83HmkKv/lIM6KLbteJusywJSfX9H5Y5rkcbxbULgGH5hy0fiKeBojXJ0WPhp7AT6C23rEBI6deBEsBcMHZaw1pcTHrOgOkUrpNQwvMgZy6LmqgnsJsmm25TmvNMvkp8I4cN1n/bAwqTj7NNypic5Z9iqMGji2dE9cA90x/NZloLh7/N+LK6LrkO48jNmve/sV9qz+klv+qDQpCD7Uf3nWo0Qj+cACJ4xmpOb4f/7ctfO5oIe/y/dYevhV3c4ll6sraonX+LklV4Dol9/SpaEABAhybDvYTBbw7+MgD+eBT7bjzTKi16mWVh1T9JKUGnsLsVWmkwxIyjqt19XRHhbBLzArHgg/rvqP1g6cQIVSa7p26S5VipWdNg8NVOsPWOHlMRBxscOhCyBgws/flkkRmMOpoWsGBKVBRZJHQ== fabian@Chamomilla-6.local
View varnish3.rb
require 'formula'
class Varnish3 <Formula
url 'http://repo.varnish-cache.org/source/varnish-3.0.2.tar.gz'
homepage 'http://www.varnish-cache.org/'
sha256 '973f60625e9690e0989e1bbc73c37ea53fc6291b8f7b03d617b76f8084a4a243'
depends_on 'pkg-config' => :build
depends_on 'pcre' => :build