Skip to content

Instantly share code, notes, and snippets.

View timlinquist's full-sized avatar

Tim Linquist timlinquist

View GitHub Profile
PAGE_SIZE = 5
EVENTS = %w(a a b c b c a a a c b c b b b c a a c a a a c b b b c b c a a a c)
EVENTS_WITH_TIMES = EVENTS.map.with_index { |id, i| [id, i] }
PARTS_A = EVENTS_WITH_TIMES.select { |entry| entry.first == 'a' }
PARTS_B = EVENTS_WITH_TIMES.select { |entry| entry.first == 'b' }
PARTS_C = EVENTS_WITH_TIMES.select { |entry| entry.first == 'c' }
def get_page(start_at)
@booleanbetrayal
booleanbetrayal / Gruntfile.js
Last active November 9, 2023 18:59
Example GruntJS configuration for a replacement to the Sprockets Rails asset pipeline
'use strict';
module.exports = function(grunt) {
// load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
// configurable paths
var paths = {