Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS responsive images</title>
<style>
/* Doesn't stop original source image being
downloaded too */
@media (min-device-width:600px) {
@malachi358
malachi358 / npm-link-permission-denied-after-build-babel.sh
Created November 20, 2018 03:49 — forked from ollelauribostrom/npm-link-permission-denied-after-build-babel.sh
Simple fix to permission denied error when using babel to transpile ES6 code during development of npm package / node module / cli
@malachi358
malachi358 / age-verification.js
Created December 3, 2020 11:29 — forked from alison-mk/age-verification.js
Age verification cookie: Check cookie on every page load, display pop up window if no cookie is found. In every instance, set cookie to expire after one day. Live and in action here: http://www.leefoil.com/
ageVerify: function() {
function setCookie(cname, cvalue, exdays) {
var d = new Date();
d.setTime(d.getTime() + (exdays*24*60*60*1000));
var expires = "expires="+d.toUTCString();
document.cookie = cname + "=" + cvalue + "; " + expires;
}
function getCookie(cname) {
var name = cname + "=";