Skip to content

Instantly share code, notes, and snippets.

@ruzz311
ruzz311 / oldSchoolJS.js
Last active March 4, 2017 18:34
An old-school mindset actually showed me this once and asked how node is not blocking. If you say "callback hell" is a reason you don't adopt node at this point(2015) you should probably sit with in the corner with the cobol engineers. (you guys make great money and there's still demand, but who wants to work with that?)
OH_SHIT_I_NEED_GLOBALS = 100001;
function iWantThis () {
while (count < window.OH_SHIT_I_NEED_GLOBALS) {
count = Math.random()*100000;
}
return "I haven't googled node yet. How does threads happen? So blocking, much crap."
}
iWantThis();
@ruzz311
ruzz311 / grunt-waitfor.js
Created January 14, 2015 19:27
A grunt task to wait for a given amount of time
"use strict";
function formatDuration(duration) {
var resultType = 'ms';
var resultVal = duration;
if (duration > 999 && duration < 60000) {
resultType = 'sec';
resultVal = duration / 1000;
} else if (duration > 59999 && duration < 3600000) {
resultType = 'min';
@ruzz311
ruzz311 / Orbital.markdown
Created November 6, 2014 15:38
A Pen by Russell.
@ruzz311
ruzz311 / Moiré-pattern-1.markdown
Last active August 29, 2015 14:02
A Pen by Russell.
@ruzz311
ruzz311 / app-list.md
Last active August 29, 2015 13:57
Apps I've been known to use

###Adobe

  • Adobe Edge Suite
  • Adobe Illustrator CS6
  • Adobe Photoshop CS6
  • DPS App Builder (Adobe)

Communication

  • Adium
  • Inky
  • LimeChat?
@ruzz311
ruzz311 / A-Pen-by-Russell.markdown
Created February 25, 2014 23:53
ShadowDOM Music Note
@ruzz311
ruzz311 / Shadow-DOM-Spinner.markdown
Created February 25, 2014 19:50
A Pen by Russell.
@ruzz311
ruzz311 / Spinner-animation.markdown
Created February 12, 2014 06:56
A Pen by Russell.

Spinner animation

This is a spinner/loading animation I created after seeing the effect in a gif a while back but can no longer find the source. The gif had the spokes showing which really helps explain how simple delaying of an animation can create the circular motion.

To show the spokes, reduce the transparency in the $spokeColor CSS variable (stylus).

If you look closely you can see that the math isn't quite tight enough to trick the eye into seeing this as a solid circle (of circles). It does "pull" out of shape near the end of the rotation.

A Pen by Russell on CodePen.