Skip to content

Instantly share code, notes, and snippets.

View pauldotknopf's full-sized avatar

Paul Knopf pauldotknopf

View GitHub Profile
@tzmartin
tzmartin / m3u8-to-mp4.md
Last active April 26, 2024 01:50
m3u8 stream to mp4 using ffmpeg

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
@application2000
application2000 / how-to-install-latest-gcc-on-ubuntu-lts.txt
Last active May 7, 2024 10:38
How to install latest gcc on Ubuntu LTS (12.04, 14.04, 16.04)
These commands are based on a askubuntu answer http://askubuntu.com/a/581497
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below.
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.
ABSOLUTELY NO WARRANTY.
If you are still reading let's carry on with the code.
sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
@mtolly
mtolly / mac-libgdiplus.sh
Last active March 10, 2024 07:35
How to build and install the Mono libgdiplus.dll on a Mac with Homebrew (update: no longer needed, see comments)
#!/bin/bash
# First install XQuartz, then...
brew install freetype fontconfig libpng
ln -s /opt/X11/include/X11 /usr/local/include/X11
git clone git@github.com:mono/libgdiplus
cd libgdiplus
./autogen.sh
make install
@davidfowl
davidfowl / Streaming.cs
Last active January 5, 2021 09:55
Awaitable tokens
public class Configuration(IAppBuilder app)
{
// TaskCompletionSource
app.Map("/streaming-api1", map =>
{
// Streaming API using SignalR
var connectionContext = GlobalHost.ConnectionManager.GetConnectionContext<RawConnection>();
map.Run(async context =>
{