Skip to content

Instantly share code, notes, and snippets.

View hendrikeng's full-sized avatar

Hendrik Werner hendrikeng

  • WeWereYoung
  • Hamburg, Germany
View GitHub Profile
@hendrikeng
hendrikeng / import-github-labels.js
Created May 15, 2017 10:50 — forked from Isaddo/import-github-labels.js
import github labels via console command
/*
Go on your labels page (https://github.com/user/repo/labels)
Edit the following label array
or
Use this snippet to export github labels (https://gist.github.com/MoOx/93c2853fee760f42d97f)
and replace it
Paste this script in your console
Press Enter!!
@hendrikeng
hendrikeng / schema-org-structured-data-markup-using-microdata.html
Created May 5, 2018 17:57 — forked from milanaryal/schema-org-structured-data-markup-using-microdata.html
An example of how to mark up a HTML5 webpage using the schema.org schemas and microdata.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Site Title</title>
<link rel="stylesheet" href="/assets/css/style.min.css">
@hendrikeng
hendrikeng / Stylefile.yml
Created July 31, 2018 10:56
Customizations for www.coffeecircle.com via StyleURL.
---
version: 1.0
domains:
- www.coffeecircle.com
url_patterns:
- www.coffeecircle.com/*
timestamp: '2018-07-31T10:56:09Z'
id: FwMJ
redirect_url: https://www.coffeecircle.com/?__styleurl=gist_7a711b656f072522270b788eaf471851
shared_via: StyleURL - (https://styleurl.app) import and export CSS changes from Chrome
2018-09-08 16:08:42 [-][-][-][info][yii\db\Connection::open] Opening DB connection: mysql:host=localhost;dbname=wfw;port=3306;
2018-09-08 16:08:42 [-][-][-][profile begin][yii\db\Connection::open] Opening DB connection: mysql:host=localhost;dbname=wfw;port=3306;
2018-09-08 16:08:42 [-][-][-][profile end][yii\db\Connection::open] Opening DB connection: mysql:host=localhost;dbname=wfw;port=3306;
2018-09-08 16:08:42 [-][-][-][info][yii\db\Command::query] SHOW TABLES
2018-09-08 16:08:42 [-][-][-][profile begin][yii\db\Command::query] SHOW TABLES
2018-09-08 16:08:42 [-][-][-][profile end][yii\db\Command::query] SHOW TABLES
2018-09-08 16:08:42 [-][-][-][info][yii\db\Command::query] SELECT *
FROM `info`
LIMIT 1
2018-09-08 16:08:42 [-][-][-][profile begin][yii\db\Command::query] SELECT *
{# @var craft \craft\web\twig\variables\CraftVariable #}
{# @var entry \craft\elements\Entry #}
{% set image = opt.data %}
{% set options = opt.imager %}
{% set defaults = {
sizes: [
{ width: 1440 },
{ width: 900 },
@hendrikeng
hendrikeng / cloudSettings
Last active December 5, 2018 09:39
Visual Studio Code Sync Settings Gist
{"lastUpload":"2018-12-05T09:39:51.027Z","extensionVersion":"v3.2.2"}
@hendrikeng
hendrikeng / FriendsDiscountAdjuster.php
Last active September 20, 2019 14:37
Discount Plugin and Adjuster
<?php
namespace craft\commerce\adjusters;
use Craft;
use craft\commerce\base\AdjusterInterface;
use craft\commerce\elements\Order;
use craft\commerce\models\OrderAdjustment;
use craft\commerce\Plugin;
@hendrikeng
hendrikeng / _lazyFocusImager.twig
Last active December 14, 2021 13:17
Twig/Craft macro for lazy responsive images/bgimages with Imager and Focuspoint
{#
// lazyLoaded Image/bgImages, optimized with Imager and Focuspoint
---------------------------------------------------------------------------
https://github.com/aelvan/Imager-Craft
https://github.com/smcyr/Craft-FocusPoint
for the bgImage intrinsic ratio classname creation check:
https://github.com/inuitcss/inuitcss/blob/develop/objects/_objects.ratio.scss
https://github.com/constancecchen/object-fit-polyfill