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
| /* ***************** | |
| * Require Imports * | |
| * *****************/ | |
| var express = require('express'); | |
| var path = require('path'); | |
| /* *********************** | |
| * Initialize Middleware * | |
| * **********************/ |
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
| sudo npm install ----save jsdoc gulp-shell |
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
| var gulp = require( 'gulp' ); | |
| var shell = require( 'gulp-shell' ); | |
| gulp.task( 'js-doc', shell.task( [ | |
| './node_modules/jsdoc/jsdoc .' | |
| ] ) ); |
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
| # Download ffmpeg with all the good stuff (requires homebrew) | |
| brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-frei0r --with-libass --with-libvo-aacenc --with-libvorbis --with-libvpx --with-opencore-amr --with-openjpeg --with-opus --with-rtmpdump --with-schroedinger --with-speex --with-theora --with-tools | |
| # get video information | |
| ffmpeg -i filename.mp4 | |
| # strip out audio | |
| ffmpeg -i input.mp4 -vcodec copy -an output.mp4 | |
| # rescale video |
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
| var CubeView = Backbone.View.extend({ | |
| // The reference to the DOM element. | |
| el: '#cube', | |
| // What to do when a CubeView is instantiated. | |
| initialize: function(){ | |
| this.render(); | |
| }, | |
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(){ | |
| $content.on('click', function(){ | |
| // case 1: currently playing, let's stop it | |
| if(!changeQuote.stop){ | |
| $content.css('background', '#ddd'); | |
| changeQuote.stop = true; | |
| } | |
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
| var $content = $('.content'); | |
| var $container = $('.container'); | |
| var quotes = [ /* array of quotes */ ]; | |
| var randomQuote = function(){ | |
| return quotes[Math.floor(Math.random() * quotes.length)]; | |
| }; | |
| var changeQuote = function(){ | |
| $content.fadeOut('slow', function(){ | |
| $container.html(randomQuote()); |
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
| var betterInterval = function(execute, delay, reverse) { | |
| execute.stop = false; | |
| execute.stopped = false; | |
| if(reverse){ execute(); } | |
| (function subroutine() { | |
| setTimeout(function() { | |
| if(!execute.stop){ | |
| execute(); | |
| subroutine(); | |
| }else{ execute.stopped = true; } |
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
| public class VineUtil { | |
| public static String findVineUrl(Status status) { | |
| String vineUrl; | |
| for (URLEntity url: status.getURLEntities()) { | |
| vineUrl = url.getExpandedURL(); | |
| if (vineUrl.contains(“vine.co / v / “)) { | |
| return vineUrl; | |
| } | |
| } |
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
| public class ProcessingThread implements Runnable { | |
| private HashSet <Status> tweets; | |
| private int bufferId; | |
| private HashSet <String> urls; | |
| private int numVinesScraped = 0; | |
| private String saveDirectory; | |
| private ProcessingListener listener; | |
| // constructor |