This document now exists on the official ASP.NET core docs page.
- Application
- Request Handling
This document now exists on the official ASP.NET core docs page.
# Create a new caption file | |
~~~~~~~~ | |
ffmpeg -i captions.srt captions.ass | |
~~~~~~~~ | |
# Add subtitles to main video without changing it | |
~~~~~~~~ | |
ffmpeg -i video.mp4 -vf "subtitles=captions.ass:force_style='OutlineColour=&H80000000,BorderStyle=4,Outline=1,Shadow=0,MarginV=20'" subtitled-video.mp4 |
/*jslint devel: true, browser: true, es5: true */ | |
/*global Promise */ | |
var promiseCount = 0; | |
function testPromise() { | |
'use strict'; | |
promiseCount += 1; | |
var thisPromiseCount = promiseCount; |
/*jslint devel: true, browser: true, es5: true */ | |
/*global Promise */ | |
// $http function is implemented in order to follow the standard Adapter pattern | |
function $http(url) { | |
'use strict'; | |
var core = { | |
// Method that performs the ajax request | |
ajax : function (method, url, args) { |
/*jslint devel: true, browser: true, es5: true */ | |
/*global Promise */ | |
function imgLoad(url) { | |
'use strict'; | |
// Create new promise with the Promise() constructor; | |
// This has as its argument a function with two parameters, resolve and reject | |
return new Promise(function (resolve, reject) { | |
// Standard XHR to load an image | |
var request = new XMLHttpRequest(); |
public static class ProcessHelper | |
{ | |
public static ProcessResult ExecuteShellCommand(string command, string arguments, int timeout) | |
{ | |
var result = new ProcessResult(); | |
using (var process = new Process()) | |
{ | |
process.StartInfo.FileName = command; | |
process.StartInfo.Arguments = arguments; |
using System; | |
using System.Diagnostics; | |
using System.Text; | |
using System.Threading.Tasks; | |
public static class ProcessAsyncHelper | |
{ | |
public static async Task<ProcessResult> ExecuteShellCommand(string command, string arguments, int timeout) | |
{ | |
var result = new ProcessResult(); |
---------------------------------------------------------------------------------------------------------------------------------- | |
Converting a series of jpeg images to a mp4 video: | |
ffmpeg.exe -f image2 -r 3 -i %06d.jpeg -r 15 -vcodec mpeg4 -s 352x240 Camera-0.avi | |
-f image2 => input format | |
-r 3 => input framerate | |
-i %06d.jpeg => input mask (files must be named sequencially, with 6 digits. Ex: "000000.jpeg", "000001.jpeg", "000002.jpeg", etc) | |
-vcodec mpeg4 => video output codec | |
-s 352x240 => resolution |
UPDATE (Fall 2020): This gist is an updated version to the Windows 10 Fall Creators Update - Installing Node.js on Windows Subsystem for Linux (WSL) guide, I usually just keep here notes, configuration or short guides for personal use, it was nice to know it also helps other ppl, I hope this one too.
Windows updated windows subsystem for linux to version 2, as the F.A.Q stated you can still use WSL
version 1 side by side with version 2. I'm not sure about existing WSL
machines surviving the upgrade process, but as always backup and 🤞. NOTE: WSL
version 1 is not replace/deprecated, and there ar