Skip to content

Instantly share code, notes, and snippets.

@OmShiv
OmShiv / overlay-pops.html
Last active December 14, 2015 04:29
Google Chrome - Overlay popups
<div id="overlay-container-1" class="overlay">
<div id="spelling-confirm-overlay" class="page" hidden="" style="max-height: 351.90000000000003px;">
<div class="close-button"></div>
<h1 i18n-content="spellingConfirmOverlay">Ask Google for Suggestions</h1>
<div class="content-area">
<span id="spelling-confirm-text" i18n-content="spellingConfirmMessage">Google Chrome can provide smarter spell-checking by sending what you type in the browser to Google servers, allowing you to use the same spell-checking technology used by Google search.</span>
<a id="spelling-confirm-learn-more" target="_blank" i18n-content="learnMore" i18n-values="href:privacyLearnMoreURL" href="https://support.google.com/chrome/?p=settings_privacy">Learn more</a>
</div>
<div class="action-area">
<div class="button-strip">
@OmShiv
OmShiv / bin-ajax.js
Last active December 14, 2015 04:29
Binary data in the OLD Web and the new HTML5 Web, via AJAX
/*
** OLD
*/
var xhr = new XMLHttpRequest();
xhr.open('GET', '/path/to/image.png', true);
// Trick to pass bytes through unprocessed.
xhr.overrideMimeType('text/plain; charset=x-user-defined')
@OmShiv
OmShiv / nodes-html5.js
Last active December 10, 2015 02:29
Connected nodes - inspired by http://dribbble.com/shots/862906-Line
window.onload = function run() {
var width = window.innerWidth;
var height = window.innerHeight;
var elm = document.createElement('canvas');
var pixelDensity = window.devicePixelRatio || 1;
var orbs = [];
var orbCount = window.innerHeight / 10;
elm.setAttribute('width', width * pixelDensity);
elm.setAttribute('height', height * pixelDensity);
@OmShiv
OmShiv / snow.html
Created December 24, 2012 07:05
Snow animation
<canvas id="canvas"></canvas>
@OmShiv
OmShiv / stereoscopic-3D-image.html
Last active December 10, 2015 02:29
Stereoscopic 3D image
<h1>Simple 3D effect</h1>
<div class="flip"></div>
@OmShiv
OmShiv / placement.css
Created May 13, 2012 15:48
Inline-block and placement
body {
font-family: sans-serif;
}
ul {
list-style: none;
}
li {
background: slategrey;