Skip to content

Instantly share code, notes, and snippets.

View skaurus's full-sized avatar

Dmitry Shalashov skaurus

View GitHub Profile
@marlosirapuan
marlosirapuan / gist:778d6beda5f8ab95695748011c864b19
Last active March 13, 2025 10:12
Download .m3u8 files on MacOS

Install ffmpeg

brew install ffmpeg

Download file through url, like this:

ffmpeg -protocol_whitelist file,http,https,tcp,tls,crypto -i "http://url-file.domain.m3u8" -c copy video.mp4
@pmarreck
pmarreck / convert_png_to_mp4.bash
Last active June 19, 2019 15:02
FFmpeg command to convert a png to a single-frame mp4 (with pretty stellar compression, especially compared to jpeg) BONUS: Full browser support!
# On OS X, with an ffmpeg installed via Homebrew, the following command works and results in a single-frame movie file that is compatible with Chrome, QuickTime and the latest iDevices:
ffmpeg -i FILENAME.png -an -vcodec libx264 -coder 1 -flags +loop -cmp +chroma -subq 10 -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -profile:v high -level 4.2 -pix_fmt yuv420p -vf “scale=trunc(iw/2)*2:trunc(ih/2)*2” -trellis 2 -partitions +parti8x8+parti4x4 -crf 24 -threads 0 -r 25 -g 25 -y FILENAME.mp4
@corburn
corburn / index.html
Last active June 26, 2024 23:09
Minimal HTML5
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>title</title>
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>
</head>
<body>
@debasishg
debasishg / gist:8172796
Last active March 5, 2025 14:11
A collection of links for streaming algorithms and data structures

General Background and Overview

  1. Probabilistic Data Structures for Web Analytics and Data Mining : A great overview of the space of probabilistic data structures and how they are used in approximation algorithm implementation.
  2. Models and Issues in Data Stream Systems
  3. Philippe Flajolet’s contribution to streaming algorithms : A presentation by Jérémie Lumbroso that visits some of the hostorical perspectives and how it all began with Flajolet
  4. Approximate Frequency Counts over Data Streams by Gurmeet Singh Manku & Rajeev Motwani : One of the early papers on the subject.
  5. [Methods for Finding Frequent Items in Data Streams](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.187.9800&amp;rep=rep1&amp;t
@fhars
fhars / PA4_Run_Tests.m
Created October 14, 2012 13:49
A test suite for PA4 of the Coursera PGM couse
% A simple test suite for PA 4
%
% copy the comparedata.m file from last week's test suite or from
% http://www.mathworks.com/matlabcentral/fileexchange/1459-comparedata
% into the directory for this weeks assignment and save this file
% as PA4_Run_Tests.m
%
% If you call PA4_RUn_Tests, it will always run all tests in sequence until the
% first test fails.
function result = PA4_Run_Tests(anyway)
@fhars
fhars / PA3Test.m
Created October 7, 2012 14:18
A test suite for PA3 of the Coursera PGM couse
% A simple test suite for PA 3
%
% copy the comparedata.m file from last week's test suite or from
% http://www.mathworks.com/matlabcentral/fileexchange/1459-comparedata
% into the directory for this weeks assignment and save this file
% as PA3Test.m
%
% A test can have three different results:
% - If the test suite says "OK", your code produced the exactly the same
% output as the sample data.
@cowboy
cowboy / jQuery immediate ready.js
Created November 5, 2010 16:32 — forked from ralphholzmann/jQuery immediate ready.js
Bind DOM ready event handlers before jQuery is loaded
// Create a "fake" jQuery function that accepts function arguments to be
// queued as DOM ready callbacks.
(function(window){
var fake = window.jQuery = window.$ = function( fn ) {
if ( Object.prototype.toString.call( fn ) === '[object Function]' ) {
fake.queue.push( fn );
}
};