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
| // REPL example bot for mineflayer | |
| // | |
| // Connects to server but doesn't have any built in logic. The terminal where | |
| // it was started is now a REPL (Read-Eval-Print-Loop). Anything typed will be | |
| // interpreted as javascript printed using util.inspect. Don't forget to try | |
| // tab completion. These variables are exposed as local: | |
| // | |
| // var mineflayer = require('mineflayer'); | |
| // var bot = mineflayer.createBot({ username: 'REPL' }); | |
| // |
Relies on some *nix CLI utilities: mediainfo; and qt-faststart (part of ffmpeg). I used homebrew to install them on OS X.
Pseudo streaming is simply a video that can start playing before it's fully dowmloaded. The videos are not streaming but rather progressively downloaded. What's important is that the file metadata (the Moov Atom) is at the start of the file rather than at the end. Usually this is an option set when encoding the file (called quick start or web start). If the files have not been encoded this way you can either re-encode or use a utility to move the Moov Atom. Re-encoding takes much longer than using a utility to move the Moov Atom so here's how to do it.
First check with mediainfo to see if video 'is streamable':
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
| 1.) | |
| ║▌║││ █ ▌│║║ | |
| 2.) | |
| ▄▀▄▀▄▀▄▀ | |
| 3.) |
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
| <main> | |
| <div class="myVideo"> | |
| <div id="vidText" class="vidText"></div> | |
| <video controls id="myVideo" width="640" height="480"> | |
| <source src="https://s3.us-east-2.amazonaws.com/leetcodes/assets/The_Lumineers_-_Ophelia.mp4" type="video/mp4"> | |
| Your browser does not support HTML5 video. | |
| </video> | |
| </div> | |
| </main> |
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
| <canvas id="scene"></canvas> | |
| <canvas id='can'></canvas> | |
| <canvas id='canv'></canvas> |
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
| <div class="wrapper"> | |
| <h1>Supercharge the week</h1> | |
| <div class="cards"> | |
| <div class="card"> | |
| <div class="overlayer"> | |
| <i class="far fa-play-circle"></i> | |
| </div> | |
| <img src="https://i.pinimg.com/736x/02/b8/94/02b894f7ea6ad9f724648ee511ad018f--edm-music-house-music.jpg" alt=""> | |
| <div class="title"> |
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
| from svgpathtools import wsvg, Line, QuadraticBezier, Path | |
| from freetype import Face | |
| def tuple_to_imag(t): | |
| return t[0] + t[1] * 1j | |
| face = Face('./Vera.ttf') |
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
| <div class="container"> | |
| <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" | |
| viewBox="0 90 612 612" style="enable-background:new 0 90 612 612;" xml:space="preserve"> | |
| <g> | |
| <path class="path border" d="M607.8,94.2V697.8H4.2V94.2H607.8M612,90H0V702H612V90h0Z" /> | |
| </g> | |
| <g> | |
| <g> | |
| <path class="path letter1" d="M330.3,102.61L234,198.91l70.71,70.71,89.42-89.42,119,119-22.63,22.63-97.4-97.4-66.79,66.79,91.48,91.48L298.3,502.22l-21-21L375,383.45,304.56,313l-91.22,91.22L94,284.82l22.24-22.24L214,360.35l69-69-92-92L309.08,81.3l21.26,21.26Z" transform="translate(0 90)" /> | |
| </g> |