Skip to content

Instantly share code, notes, and snippets.

View amwmedia's full-sized avatar

Andrew Worcester amwmedia

View GitHub Profile
@amwmedia
amwmedia / QuickChain.html
Last active August 29, 2015 14:05
QuickChain
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="QuickChain" />
<script src="http://code.jquery.com/jquery.min.js"></script>
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<meta charset="utf-8">
<title>QuickChain</title>
<style id="jsbin-css">
h1 {
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="XXHash" />
<meta charset="utf-8">
<title>JS Bin</title>
<script src="https://rawgit.com/pierrec/js-xxhash/master/build/xxhash.min.lmd.js"></script>
<style id="jsbin-css">
html, body {
height: 80%;
@amwmedia
amwmedia / css_resources.md
Last active August 29, 2015 14:09 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@amwmedia
amwmedia / index.html
Last active August 29, 2015 14:11 — forked from smt/index.html
<!DOCTYPE html>
<html>
<!--
Based on: http://www.reddit.com/r/gifs/comments/2on8si/connecting_to_server_so_mesmerizing/
See also: http://codepen.io/anon/pen/OPMvOb
http://jsbin.com/xecosiyomo/1/edit?js,output
-->
<head>
<title>Mesmerizing</title>
<style>
@amwmedia
amwmedia / Pushing-Particles.markdown
Created December 17, 2014 19:51
Pushing Particles

Pushing Particles

The number of particles will be increased until your CPU can no longer maintain at least 45 FPS. If your FPS drops below 45, particles will be removed. The particles will also track your mouse, so that's fun too :-)

How much can YOUR system handle?!

A Pen by Andrew Worcester on CodePen.

License.

@amwmedia
amwmedia / type checker
Last active December 28, 2015 00:39
nice little type checking function
function type(o) {
o = Object.prototype.toString.call(o);
return o.match(/ (.*)]/)[1].toLowerCase();
}

Keybase proof

I hereby claim:

  • I am amwmedia on github.
  • I am amwmedia (https://keybase.io/amwmedia) on keybase.
  • I have a public key whose fingerprint is 5EAE 5EB7 A9B2 75BC F9BD FFD4 6DF7 61AB 1F21 F1DC

To claim this, I am signing this object:

@amwmedia
amwmedia / random-data-generator.js
Last active December 28, 2016 20:11
uncontext style random data generator. Used for the random-nodecopter project my team did at jsconf2015.
(function () {
var data = {};
var dataLastSent = '';
var listeners = [];
setInterval(genA, 1500);
setInterval(genB, 2270);
setInterval(genC, 5234);
genA();
@amwmedia
amwmedia / glean.js
Last active August 25, 2017 12:21
Glean... what you want from any data source.
/**
* glean - Access nested paths in an object whos structure we are uncertain of.
* Unholy marriage of Facebook's existential function and lodash get()
* https://facebook.github.io/react-native/blog/2017/03/13/idx-the-existential-function.html
* https://lodash.com/docs#get
*
* @param {Object} source the source object we are operating on
* @param {Function} accessor attepts to access the property desired
* @param {Any} defaultValue = null value to return if the accessor throws
* @return {Any}
@amwmedia
amwmedia / Day1Solution.js
Last active December 6, 2017 14:55
Advent Of Code 2017
// Day 1 - Challenge #1
input.split('').reduce((acc, d, i, a) => {
const n1 = Number(d);
const n2 = Number(a[i+1] || a[0]);
return (n1 === n2 ? acc + n1 : acc);
}, 0);
// Day 1 - Challenge #2
input.split('').reduce((acc, d, i, a) => {
const n2Pos = (i + (a.length / 2)) % a.length;