Skip to content

Instantly share code, notes, and snippets.

View ransagy's full-sized avatar

Ran Sagy ransagy

  • WSC Sports
  • Israel
View GitHub Profile
@ransagy
ransagy / DelayFadeSampleProvider.cs
Last active September 1, 2020 11:33 — forked from Ahmed-Abdelhameed/DelayFadeOutSampleProvider.cs
NAudio basic example of how to begin a fade in or fade out after a certain number of milliseconds have elapsed, as a stop gap to crossfading.
using NAudio.Wave;
namespace WaveCombineHelper
{
/// <summary>
/// Sample Provider to allow fading in and out with delays. Based on https://gist.github.com/Ahmed-Abdelhameed/b867a8cfe739cd7a128b73a33d317402
/// </summary>
public class DelayFadeSampleProvider : ISampleProvider
{
private enum FadeState
@ransagy
ransagy / PostCommentToAzureDevopsPullRequest.ps1
Created March 17, 2022 09:17
Example of adding a comment to a pull request in Azure Devops using the REST API
# status 4 = closed
$Body = @"
{
"comments": [
{
"parentCommentId": 0,
"content": "Just ye olde comment added and marked as closed..",
"commentType": 1
}
],
@ransagy
ransagy / compile-ffmpeg-nvenc.sh
Last active April 27, 2023 17:11 — forked from Prototype-X/compile-ffmpeg-nvenc.sh
Script to build a static FFMpeg binary with NVENC support
#!/bin/bash
# This script will compile and install a static ffmpeg build with support for nvenc in ubuntu.
# See the prefix path and compile options if edits are needed to suit your needs.
# NOTE: This build is made to target Ubunutu 16.04 Data-Science Azure VMs - With nVidia 418.xx drivers and CUDA SDK 9.0.
# It also relies on a hack described in https://trac.ffmpeg.org/ticket/6431#comment:7 to make glibc dynamic still.
# Long story short, you need to edit your ffmepg's configure script to avoid failures on libm and libdl.
# in function probe_cc, replace the _flags_filter line to: _flags_filter='filter_out -lm|-ldl'