Skip to content

Instantly share code, notes, and snippets.


Marcus Herrmann marcus-herrmann

View GitHub Profile
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);
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)
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.



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

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
marcedwards / high-dpi-media.css
Last active May 5, 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 */
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 = [];