Skip to content

Instantly share code, notes, and snippets.

View LeetCodes's full-sized avatar
🎱
Choppin' caine rain, hail, sleet, or snow

LeetCodes

🎱
Choppin' caine rain, hail, sleet, or snow
View GitHub Profile
@LeetCodes
LeetCodes / 80-s-computer-user-interface.markdown
Created June 14, 2018 01:24
80's Computer User Interface
@LeetCodes
LeetCodes / repl_bot.js
Created June 15, 2018 00:24 — forked from vogonistic/repl_bot.js
REPL example bot for mineflayer. Allows testing javascript over CLI to speed up development.
// 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' });
//
@LeetCodes
LeetCodes / video-fix-videos-for-pseudo-streaming.md
Created June 22, 2018 06:21 — forked from alienresident/video-fix-videos-for-pseudo-streaming.md
How to: Fix pseudo-streaming videos by moving Moov Atom
How to:

Fix pseudo-streaming videos by moving Moov Atom

Relies on some *nix CLI utilities: mediainfo; and qt-faststart (part of ffmpeg). I used homebrew to install them on OS X.

What is pseudo-streaming?

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.

Steps

First check with mediainfo to see if video 'is streamable':

@LeetCodes
LeetCodes / unicode.txt
Created July 15, 2018 09:16 — forked from Meroje/unicode.txt
Some handpicked Unicode Art
1.)
║▌║││ █ ▌│║║
2.)
▄▀▄▀▄▀▄▀
3.)
<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>

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

<canvas id="scene"></canvas>
<canvas id='can'></canvas>
<canvas id='canv'></canvas>
@LeetCodes
LeetCodes / index.html
Created August 12, 2018 10:23
Like Spotify Cards UI
<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">
@LeetCodes
LeetCodes / text_to_svg_path.py
Created August 19, 2018 11:00 — forked from CatherineH/text_to_svg_path.py
Convert a text character to an SVG path.
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')
@LeetCodes
LeetCodes / index.html
Created August 19, 2018 13:33
卐.zone SVG Logo Animation with CSS
<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>