Skip to content

Instantly share code, notes, and snippets.

View jensgro's full-sized avatar

Jens Grochtdreis jensgro

View GitHub Profile
@tkadlec
tkadlec / perf-diagnostics.css
Last active March 20, 2025 08:41
CSS used to highlight potential performance issues
:root {
--violation-color: red; /* used for clear issues */
--warning-color: orange; /* used for potential issues we should look into */
}
/* IMAGES */
/*
* Lazy-Loaded Images Check
* ====
@squidfunk
squidfunk / pseudo-elements.md
Created September 18, 2020 14:29 — forked from alwayrun/pseudo-elements.md
A CSS pseudo-element is used to style specified parts of an element. In some cases you can style native HTML controls with vendor specific pseudo-elements. Here you will find an list of cross browser specific pseudo-element selectors.

Styling native elements

Native HTML controls are a challenge to style. You can style any element in the web platform that uses Shadow DOM with a pseudo element ::pseudo-element or the /deep/ path selector.

video::webkit-media-controls-timeline {
  background-color: lime;
}

video /deep/ input[type=range] {
@babette-landmesser
babette-landmesser / data.js
Created June 1, 2020 12:46
D3.js sitemap creation
export default {
data: [
{"name":"mediaman.com/"},
{"name":"mediaman.com/leistungen/digitale-beratung"},
{"name":"mediaman.com/leistungen/data-sprint"},
{"name":"mediaman.com/leistungen/data-ideation-workshop"},
{"name":"mediaman.com/agentur"},
{"name":"mediaman.com/jobs"},
{"name":"mediaman.com/datenschutzhinweise"},
{"name":"mediaman.com/impressum"},
[class*='ary'].vf-card--bordered {
--vf-card-theme-color--background: white;
}
/*
* We have 4 'themes' that only add colour
* We have (potentially several) design variants
* One of those is where we only have a border of colour rather than a block of color with text on it.
* This updates the background colour for any card that has the 'normal' design variant
* with any of the four colour palettes - primary, secondary, etc, etc.
@bradtraversy
bradtraversy / flutter_setup.md
Last active April 12, 2025 21:45
Flutter dev setup & notes
@jensgro
jensgro / sr-only.css
Last active December 2, 2020 15:29
Content is only accessible for screenreaders. The white-space-line is important!
/* hide only visually */
.sr-only:not(:focus):not(:active) {
width: 1px;
clip: rect(0 0 0 0);
clip-path: inset(50%);
height: 1px;
overflow: hidden;
position: absolute;
white-space: nowrap;
}
/* https://allyjs.io/tutorials/hiding-elements.html */
.visuallyhidden:not(:focus):not(:active) {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
border: 0;
padding: 0;
@programmiri
programmiri / recipe.md
Last active July 5, 2019 13:18
Recipe for a salat with roasted cauliflower. I call it the "I discovered roasted cauliflower and it was one of the best days of my life" salad.

Disclaimer

I put a lot of things in I just found in the freezer, so it's not really possible to give you correct data about quantities and stuff.

Things you need in no particular order

For the salad

  • red lentils
  • 2 bell peppers
  • 1 Avocado
  • generous amount of fresh cilantro
@liyuqian
liyuqian / Dockerfile
Last active May 21, 2021 16:42
Production Windows Dockerfile Test
# This is tested on a "Windows Server version 1803 Datacenter Core for Containers" VM on GCE.
# It's known that other versions such as 1809 and Windows Server 2019 won't work with this.
#
# Note that "\" is the escape character. Use "\\"" for windows path separator. In many cases,
# "/"" can also be used as the separator in windows.
FROM microsoft/windowsservercore:1803
# Restore the default Windows shell for correct batch processing.
SHELL ["cmd", "/S", "/C"]
@mikowl
mikowl / oneliners.js
Last active February 19, 2025 05:20
👑 Awesome one-liners you might find useful while coding.
// Inspired by https://twitter.com/coderitual/status/1112297299307384833 and https://tapajyoti-bose.medium.com/7-killer-one-liners-in-javascript-33db6798f5bf
// Remove any duplicates from an array of primitives.
const unique = [...new Set(arr)]
// Sleep in async functions. Use: await sleep(2000).
const sleep = (ms) => (new Promise(resolve => setTimeout(resolve, ms)));
// or
const sleep = util.promisify(setTimeout);