Skip to content

Instantly share code, notes, and snippets.

View omniosi's full-sized avatar

Ornette Coleman omniosi

View GitHub Profile
@omniosi
omniosi / custom console log
Created February 4, 2014 14:50
a function to call a console log to avoid console issues in IE
//custom console.log
function log(msg){
try{
console.log(msg);
}
catch(e){
}
}
@omniosi
omniosi / jsbin.gesuf.html
Created February 13, 2014 17:12
function to reveal more
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<ul>
<li>One</li>
@omniosi
omniosi / jsbin.xamak.html
Last active August 29, 2015 13:56
animating arm tween with Raphael JS
<!DOCTYPE html>
<html>
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div id="box"></div>
</body>
@omniosi
omniosi / jsbin.ripiq.css
Created February 28, 2014 19:43
a CSS-animated menu/close button inspired by http://www.hugeinc.com/
*{
-webkit-transition: opacity 100ms ease;
transition: opacity 100ms ease;
-webkit-transition: all 500ms ease;
transition: all 500ms ease;
}
#box{
background:lightgrey;
width:60px;
height:60px;
@omniosi
omniosi / jsbin.zaxiyoxi.css
Last active December 2, 2015 12:00
an animated opening and closing menu button made with RaphaelJS and inspired by http://www.hugeinc.com/. It even works in IE6!
#box{
background:lightgrey;
width:60px;
height:60px;
}
@omniosi
omniosi / jsbin.qegik.html
Last active August 29, 2015 13:56
Illustrator SVG converted with http://readysetraphael.com/ to RaphaelJS with notes on how to make the file work correctly.
<!DOCTYPE html>
<html>
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div id="rsr"></div>
</body>
@omniosi
omniosi / jsbin.xamak.html
Created March 3, 2014 20:38
updated RaphaelJS interactive arm animation
<!DOCTYPE html>
<html>
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div id="box"></div>
</body>
@omniosi
omniosi / jsbin.nerey.html
Created March 4, 2014 17:11
simple banner animation with RaphaelJS. not realistic as RaphaelJS library is 91K at its smallest and iab banner size spec is 40K
<!DOCTYPE html>
<html>
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div id="box"></div>
</body>
@omniosi
omniosi / flash_generated_raindrops
Created March 6, 2014 19:46
code to duplicate and animate a movie clip. raindrops in this example
for (i=0; i<300; i++) {
duplicateMovieClip("drop", "drop"+i, i);
setProperty("drop"+i, _alpha, random(50));
i++;
}
@omniosi
omniosi / generate_random-number
Created March 6, 2014 22:09
a function to generate a random number with a minimum and a maximum
// Returns a random integer between min and max
// Using Math.round() will give you a non-uniform distribution!
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}