This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple 16 step drum machine experiment with Node and CoffeeScript | |
# by Peter Cooper - @peterc | |
# | |
# Inspired by Giles Bowkett's screencast at | |
# http://gilesbowkett.blogspot.com/2012/02/making-music-with-javascript-is-easy.html | |
# | |
# Screencast demo of this code at http://www.youtube.com/watch?v=qWKkEaKL6DQ | |
# | |
# Required: | |
# node, npm and coffee-script installed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#search').keyup(function () { | |
var searchField = $('#search').val(); | |
var regExp = new RegExp(searchField, 'i'); | |
$.getJSON('data.json', function (data) { | |
var results = []; | |
var output = $('<ul>').addClass('output'); | |
var results = $.map(data, function(value, key) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// GV Slider | |
"use strict"; | |
var gvcharts = gvcharts || {}; | |
gvcharts.defaults = { | |
margin: {top: 80, right: 80, bottom: 240, left: 200}, | |
padding: 20, | |
axisBorder: 4, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;(function($, window) { | |
var defaults = { | |
duration: 1000, | |
delay: 500, | |
hideTree: 'hideTree', | |
showTree: 'showTree' | |
} | |
function accordion(el,options) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function pullProperties = function(obj, props) { | |
return _.filter(obj, function(prop) { | |
return _.includes(props, prop); | |
}) | |
} | |
Slider.prototype.getActual = function(dataset) { | |
if(!dataset.actual) return []; | |
_.map(dataset.actual, function(item) { | |
return pullProperties(item, ['output', 'minValue','maxValue']); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![allow(dead_code)] | |
use std::fmt::Debug; | |
#[derive(Debug)] | |
struct Matchbook { | |
matchers: Vec<Box<dyn Matcher>>, | |
} | |
impl Matchbook { |
OlderNewer