Skip to content

Instantly share code, notes, and snippets.

View mahboob-awan's full-sized avatar

Mahboob Ur Rasheed mahboob-awan

  • Netset AB
  • World Wide Web
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>Page speed test</title>
</head>
<body>
<img src="https://via.placeholder.com/150" />
<br/>
<img src="https://via.placeholder.com/200" />
<br/>
@mahboob-awan
mahboob-awan / dabblet.html
Last active August 17, 2021 11:12
Untitled
<!DOCTYPE html>
<html>
<head>
<title>Page speed test</title>
<style>
img {
width: 100%;
height: auto;
aspect-ratio: attr(width) / attr(height);
}
<!DOCTYPE html>
<html>
<head>
<title>Page speed test</title>
</head>
<body>
<img src="https://via.placeholder.com/150" />
<br/>
<img src="https://via.placeholder.com/200" />
<br/>
<!DOCTYPE html>
<html>
<head>
<title>Page speed test</title>
</head>
<body>
<img src="https://via.placeholder.com/150" width="150" height="300" />
<br/>
<img src="https://via.placeholder.com/200" width="200" height="300" />
<br/>
/**
* Scrolling shadows by @kizmarh and @leaverou
* Only works in browsers supporting background-attachment: local; & CSS gradients
* Degrades gracefully
*/
html {
background: white;
font: 120% sans-serif;
}
@mahboob-awan
mahboob-awan / dabblet.css
Last active May 12, 2020 10:28
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@mahboob-awan
mahboob-awan / dabblet.html
Last active February 7, 2018 16:11
Untitled
<button id="aButton">Trigger on Click</button><hr><input type="checkbox" name="" id="aCheckbox">Trigger on Change<hr><a href="https://services.github.com/on-demand/downloads/github-git-cheat-sheet.pdf" download>Download pdf</a> <pre>Steps to reproduce the bug in IE11:1 - Download PDF2 - Change checkbox state3 - CustomEvent does not trigger!</pre>
//=========== E-commerce Tracking
//OLD
_gaq.push(['_addTrans',
'1234', // transaction ID - required
'Apple', // affiliation or store name
'465', // total - required
'1.29', // tax
'5' // shipping
]);
// =========== Tracking Code: Site Speed User Timing
//OLD
_gaq.push(['_trackTiming', 'jQuery', 'Load OLD Library', 20, 'Google CDN', 100]);
_gaq.push(['_trackTiming', 'jQuery', 'Load OLD Library', 50, 'jQuery CDN', 100]);
//NEW
ga('send', 'timing', 'jQuery', 'Load NEW Library', 20, 'Google CDN', 100);
ga('send', 'timing', 'jQuery', 'Load NEW Library', 90, 'jQuery CDN', 100);
//=========== Tracking Code: Event Tracking
//OLD
_gaq.push(['_trackEvent', 'Videos', 'Play', 'OLD OLD Gooogle']);
//NEW
ga('send', 'event', 'Videos', 'Play', 'NEW NEW Gaaagle');