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
| ####################### | |
| # clips_to_mosaic.sh # | |
| # Requires ffmpeg # | |
| ####################### | |
| # This file contains video paths, one per line | |
| FILE="infile.txt" | |
| # Square tile size (pixels) | |
| TILE_SIDE=108 |
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
| // Copyright (c) 2014 The Chromium Authors. All rights reserved. | |
| // Use of this source code is governed by a BSD-style license that can be | |
| // found in the LICENSE file. | |
| (function() { | |
| 'use strict'; | |
| /** | |
| * T-Rex runner. | |
| * @param {string} outerContainerId Outer containing element id. | |
| * @param {Object} opt_config | |
| * @constructor |
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
| const { makeExecutableSchema } = require('graphql-tools'); | |
| const gql = require('graphql-tag'); | |
| const typeDefs = gql` | |
| type Show { | |
| title: String! | |
| time: String! | |
| host: String! | |
| location: String! | |
| } |
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
| const { makeExecutableSchema } = require('graphql-tools'); | |
| const { GraphQLDateTime } = require('graphql-iso-date'); | |
| const gql = require('graphql-tag'); | |
| const typeDefs = gql` | |
| scalar DateTime | |
| type Show { | |
| title: String! | |
| time: DateTime! |
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
| module.exports = makeExecutableSchema({ | |
| typeDefs, | |
| resolvers: { | |
| DateTime: GraphQLDateTime, | |
| Query: { | |
| allShows: () => [ | |
| { | |
| title: 'Dance Party', | |
| time: '2018-10-27T13:00:00Z', | |
| host: 'Caramba', |
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
| module.exports = makeExecutableSchema({ | |
| typeDefs, | |
| resolvers: { | |
| DateTime: GraphQLDateTime, | |
| Query: { | |
| allShows: () => getShows() | |
| }, | |
| Mutation: { | |
| addShow: (_, data) => { | |
| addShow(data); |
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
| module.exports = function addShow(data) { | |
| // code to add show | |
| }; |
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
| module.exports = function getShows() { | |
| return []; | |
| }; |
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
| const max50 = str => str.length <= 50; | |
| module.exports = function addShow({ title, time, host, location }) { | |
| if (!title || !max50(title)) { | |
| throw new Error(`title can't be longer than 50 characters`); | |
| } | |
| if (!(time instanceof Date)) { | |
| throw new Error(`time must be a date object`); | |
| } |
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
| module.exports = { | |
| createStore() { | |
| let events = []; | |
| return { | |
| commit(event) { | |
| events = [...events, event]; | |
| } | |
| }; | |
| } | |
| }; |
OlderNewer