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
| # convert mov to ogv | |
| ffmpeg -i RFI_CaseStudy_V3b_DS_720p.mov -vb 3221700 -f ogg RFI.ogv | |
| # convert mov to webm | |
| ffmpeg -i RFI_CaseStudy_V3b_DS_720p.mov -vb 3221700 -f webm RFI.webm | |
| # get a screenshot at the 14s mark | |
| ffmpeg -ss 00:00:14 -i RFI_CaseStudy_V3b_DS_720p.mov -vframes 1 RFI.png |
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
| app.get '/riders', (req, res) -> | |
| redis.smembers 'riders', ( err, replies ) -> | |
| pool = new RequestPool ( rider, callback ) -> redis.hgetall rider, callback | |
| pool.push rider for rider in replies | |
| pool.go -> alert 'Done!' |
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
| class User < Struct.new(:name, :phone, :email) | |
| end | |
| # --------------------------------------------------------------------------- | |
| # Extend on demand | |
| # + no dependency on User class, could be reusable | |
| # + composable | |
| # - cannot unextend user object once extended, but this object could be short | |
| # lived | |
| # --------------------------------------------------------------------------- |
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
| #!/usr/bin/env ruby -wKU | |
| require "yaml" | |
| =begin | |
| TODO this could all use a little DRYing up | |
| =end | |
| class Event | |
| TYPE_PATTERN = /public\s+static\s+(?:const|var)\s+([A-Z_]+)\s+:\s+String\s+=\s+(.*?);/ | |
| CLASS_PATTERN = /public\s+class\s+(\w+)\s+extends\s+Event/ |
NewerOlder