Skip to content

Instantly share code, notes, and snippets.

View omniosi's full-sized avatar

Ornette Coleman omniosi

View GitHub Profile
@omniosi
omniosi / jsbin.yibiz.html
Created March 6, 2014 22:14
create randomly positioned copies of an object
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style>
#box{
width:300px;
height:250px;
background: lightblue;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin - rAF test</title>
<style>
#elm{
background: lightblue;
width: 20px;
height: 20px;
@omniosi
omniosi / jsbin.ciweb.html
Created March 14, 2014 20:27
using RaphaelJS to animate a circle path into a custom shape path. inlcudes a function to convert a RaphaelJS circle shape to a path (a cleaned up version of this code: https://groups.google.com/forum/#!topic/raphaeljs/6gH8TiOWlAw)
<!DOCTYPE html>
<html>
<head>
<style>
#box{
width:300px;
height:250px;
background: lightblue;
border:1px solid black;
}
@omniosi
omniosi / jsbin.sunip.html
Created April 11, 2014 19:19
pointer events code by @girlie_mac as seen in netm.ag may 2014
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script>
var isTouchSupported = 'ontouchstart' in window;
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, maximum-scale=1.0, target-densityDpi=device-dpi">
@omniosi
omniosi / cross-browser-width-height
Created April 28, 2014 15:35
cross browser code to get the browser window width and height
var w = window,
d = document,
e = d.documentElement,
g = d.getElementsByTagName('body')[0],
x = w.innerWidth || e.clientWidth || g.clientWidth,
y = w.innerHeight|| e.clientHeight|| g.clientHeight;
console.log("browser width = "+x);
console.log("browser height = "+y);
<IfModule mod_deflate.c>
# Insert filter
SetOutputFilter DEFLATE
# Don't compress images
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary
</IfModule>
@omniosi
omniosi / http-server
Created August 11, 2014 19:38
create a local basic HTTP server in terminal
// Python 2.x:
python -m SimpleHTTPServer
// Python 3.x:
python -m http.server
// test the web server at http://localhost:8000/
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
.image{
width: 30px;
/*width: 0;*/
height: 10px;
@omniosi
omniosi / logo-anim-test.html
Created February 1, 2016 06:22
animate drawing logo using SVG mask
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>logo animation test</title>
</head>
<body>
<svg version="1.1" id="odc-logo" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="600px" height="90px" viewBox="0.5 792.5 600 90" enable-background="new 0.5 792.5 600 90" xml:space="preserve">
<defs>