Skip to content

Instantly share code, notes, and snippets.

Avatar

Marcel Hauri mhauri

View GitHub Profile
@mhauri
mhauri / gatsby-config.js
Last active Oct 27, 2020
Tree Extension for gatsby-remark-prismjs
View gatsby-config.js
// In your gatsby-config.js
plugins: [
{
resolve: `gatsby-transformer-remark`,
options: {
plugins: [
{
resolve: `gatsby-remark-prismjs`,
options: {
languageExtensions: [
View lighthouse_node_hajk.json
{
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36",
"environment": {
"networkUserAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3694.0 Mobile Safari/537.36 Chrome-Lighthouse",
"hostUserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36",
"benchmarkIndex": 1134
},
"lighthouseVersion": "5.0.0",
"fetchTime": "2019-05-22T06:59:47.871Z",
"requestedUrl": "https://www.hajk.ch/de/",
View lighthouse_hajk_mobile.json
{"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36","environment":{"networkUserAgent":"Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3694.0 Mobile Safari/537.36 Chrome-Lighthouse","hostUserAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36","benchmarkIndex":1304},"lighthouseVersion":"4.2.0","fetchTime":"2019-05-22T06:28:36.367Z","requestedUrl":"https://www.hajk.ch/de/","finalUrl":"https://www.hajk.ch/de/","runWarnings":[],"audits":{"is-on-https":{"id":"is-on-https","title":"Uses HTTPS","description":"All sites should be protected with HTTPS, even ones that don't handle sensitive data. HTTPS prevents intruders from tampering with or passively listening in on the communications between your app and your users, and is a prerequisite for HTTP/2 and many new web platform APIs. [Learn more](ht
View www.hajk.ch-20190522T082803.json
{"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36","environment":{"networkUserAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36","hostUserAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36","benchmarkIndex":1250},"lighthouseVersion":"4.2.0","fetchTime":"2019-05-22T06:28:03.116Z","requestedUrl":"https://www.hajk.ch/de/","finalUrl":"https://www.hajk.ch/de/","runWarnings":[],"audits":{"is-on-https":{"id":"is-on-https","title":"Uses HTTPS","description":"All sites should be protected with HTTPS, even ones that don't handle sensitive data. HTTPS prevents intruders from tampering with or passively listening in on the communications between your app and your users, and is a prerequisite for HTTP/2 and many new web platform APIs. [Learn more](https://developers.google.com/web/
@mhauri
mhauri / AdminCreateSimpleProductCest.xml
Last active Nov 18, 2017
MFTF - AdminCreateSimpleProductCest.xml
View AdminCreateSimpleProductCest.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
@mhauri
mhauri / AdminLoginCest.xml
Created Nov 18, 2017
MFTM - AdminLoginCest.xml
View AdminLoginCest.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
View FilterListPlugin.php
<?php
namespace Demo\Navigation\Plugin\Layer;
use Magento\Catalog\Model\ResourceModel\Layer\Filter\Attribute;
use Magento\Framework\App\RequestInterface;
use Magento\Catalog\Model\Layer\Filter\ItemFactory;
use Magento\Catalog\Model\Category;
use Magento\Catalog\Model\Layer\FilterList;
use Magento\Catalog\Model\Product;
@mhauri
mhauri / ws.sh
Created Oct 28, 2016
Create and manage a case-sensitive disk-image on OSX.
View ws.sh
#!/bin/bash
# where to store the sparse-image
WORKSPACE=~/Documents/workspace.dmg.sparseimage
create() {
hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 60g -volname workspace ${WORKSPACE}
}
detach() {
View keybase.md

Keybase proof

I hereby claim:

  • I am mhauri on github.
  • I am mhauri (https://keybase.io/mhauri) on keybase.
  • I have a public key whose fingerprint is A18F 1493 F837 15FF 8CBD BC8F 1D9B 6CEE 8F13 A5A9

To claim this, I am signing this object:

@mhauri
mhauri / composer.json
Created Sep 16, 2015
Magento Demo composer.json
View composer.json
{
"minimum-stability":"dev",
"repositories": [
{
"type": "vcs",
"url": "ssh://git@stash.staempfli.com:7999/stmagento/demotheme.git"
},
{
"type": "package",
"package": {