Skip to content

Instantly share code, notes, and snippets.

@btownrippleman
btownrippleman / 0_reuse_code.js
Created July 1, 2016 15:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

Sakura Animation using WebGl

Sakura animation using WebGL. No images are used. The framerate might be slow or the demo might not play at all in some older systems so you can watch this video: http://www.screenr.com/BFZ8. Let me make it clear that I did not make this and just thought is was very cool and wanted to share it.

A Pen by Frank FitzGerald on CodePen.

License.

@btownrippleman
btownrippleman / census.rb
Last active October 9, 2015 01:01 — forked from stevenshelby/census.rb
My solution to a problem seen on http://opengarden.com/careers.html in ruby.
#!/usr/bin/ruby
#The 2010 Census puts populations of 26 largest US metro areas at
#18897109, 12828837, 9461105, 6371773, 5965343, 5946800, 5582170, 5564635, 5268860, 4552402, 4335391, 4296250, 4224851, 4192887, 3439809, 3279833, 3095313, 2812896, 2783243, 2710489, 2543482, 2356285, 2226009, 2149127, 2142508, and 2134411.
#Can you find a subset of these areas where a total of exactly 100,000,000 people live,
#assuming the census estimates are exactly right? Provide the answer and code or reasoning used.
populations = [18897109, 12828837, 9461105, 6371773, 5965343, 5946800, 5582170, 5564635, 5268860, 4552402, 4335391, 4296250, 4224851, 4192887, 3439809, 3279833, 3095313, 2812896, 2783243, 2710489, 2543482, 2356285, 2226009, 2149127, 2142508, 2134411]
target = 100000001

Quick 'n dirty iTunes 11 style scroller

Spent a couple of hours seeing if I could recreate the album scroller found in the store view of the latest version of iTunes. Uses CSS3 transforms for animation and some jQuery to handle interaction. Definitely needs tidying up, and probably only works in WebKit and latest FireFox for now.

Update: Fixed the auto-scroll so now it will pause when you hover the scroller. Also fixed couple of other little bugs with the animation queue.

Forked from Chris Green's Pen Quick 'n dirty iTunes 11 style scroller.

A Pen by braden on CodePen.