Skip to content

Instantly share code, notes, and snippets.


Marcus Herrmann marcus-herrmann

View GitHub Profile

Authors Guide: Article Template

Please submit your article including all of the information below. You can include this as a seperate file if you like - but please complete each section. Please use an online service to write your article, for example Dropbox Paper,, Google Docs. For more help, see the editorial guide

Article Title

Ideally under 67 characters, what problem does this article solve?

Quick Summary

marcedwards / high-dpi-media.css
Last active Jun 28, 2021
A CSS media query that captures almost all high DPI aware devices.
View high-dpi-media.css
/* ---------------------------------------------------------- */
/* */
/* A media query that captures: */
/* */
/* - Retina iOS devices */
/* - Retina Macs running Safari */
/* - High DPI Windows PCs running IE 8 and above */
/* - Low DPI Windows PCs running IE, zoomed in */
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */
/* - Android hdpi devices and above */
LucaRosaldi / get-browser-language.php
Last active Jun 14, 2021
PHP: Detect Browser Language
View get-browser-language.php
* Get browser language, given an array of avalaible languages.
* @param [array] $availableLanguages Avalaible languages for the site
* @param [string] $default Default language for the site
* @return [string] Language code/prefix
function get_browser_language( $available = [], $default = 'en' ) {
if ( isset( $_SERVER[ 'HTTP_ACCEPT_LANGUAGE' ] ) ) {
PhilippSoehnlein / demo.js
Created Aug 20, 2017
Lazy loading images with Intersection Observer
View demo.js
* A simple demo on how the new Intersection Observer API can be used to lazy load images.
* Intersection Observer is available in most modern browsers and there's a decent polyfill, too:
let imageNodes = [];
lucasfais / gist:1207002
Created Sep 9, 2011
Sublime Text 2 - Useful Shortcuts
View gist:1207002

Sublime Text 2 – Useful Shortcuts (Mac OS X)


⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
svinkle /
Last active Jan 15, 2021
Screencast with VoiceOver

Screencast with VoiceOver

Here’s a quick how-to on recording your Mac desktop while using the VoiceOver screen reader. With this setup you’ll be able to capture both video and internal audio at the same time, and hear the audio output while recording.


For this setup we’ll be on OS X El Capitan and use QuickTime to capture the video and audio. The only extra thing required is the iShowU Audio Capture driver.


View observe.js
// Elements with `data-observe` toggle `data-visible`
// between `true` and `false`
if ('IntersectionObserver' in window) {
const callback = (entries, observer) => {
entries.forEach(entry => {'data-visible', entry.isIntersecting)
View jQuery HTML5 placeholder fix.js
// Released under MIT license:
$('[placeholder]').focus(function() {
var input = $(this);
if (input.val() == input.attr('placeholder')) {
}).blur(function() {
var input = $(this);
soffes / perferences.json
Created Aug 22, 2012
My Sublime Text 2 config
View perferences.json
"bold_folder_labels": true,
"color_scheme": "Packages/User/Espresso Soda.tmTheme",
"ensure_newline_at_eof_on_save": true,
christophengelmayer / Contract Killer
Last active Mar 22, 2019 — forked from malarkey/Contract Killer
Contract Killer 3 - German Translation / Deutsche Übersetzung von Contract Killer 3, einer Vertragsvorlage für Webdesign und -development Tätigkeiten.
View Contract Killer

Contract Killer 3 deutsch

Letzte Änderung: 21.01.2013

Zwischen uns [Unser Firmenname] und Ihnen [Name des Kunden]


Wir tun immer unser Bestes um Ihre Bedürfnisse und Erwartungen zu erfüllen, jedoch ist es wichtig Dinge niederzuschreiben damit jeder weiß, was was ist, wer was und wann tuen soll und was passiert wenn etwas schief läuft. In diesem Vertrage werden Sie keine komplizierten, in Juristensprache verfassten Geschäftsbedingungen oder lange Passagen von unleserlichem Text finden.