Skip to content

Instantly share code, notes, and snippets.

@keiya
keiya / README.md
Last active April 22, 2024 06:43
How to broadcast to Icecast2 by using ffmpeg (FLAC,Opus,Vorbis,AAC,MP3/Windows, Mac)

FFMpeg to Icecast2 Streaming Samples

Examples usage of various codecs with FFMpeg.

Samples

  • flac.sh : An Icecast Source Client
    • for Windows (Cygwin is required)
    • and macOS (brew install ffmpeg)
  • another_examples.sh : Samples
  • FFMpeg can push to Icecast2 in various formats: Opus/Vorbis/AAC/MP3
@Quotation
Quotation / shell.py
Last active August 19, 2023 14:23 — forked from defrex/shell.py
Use ptpython for Django shell
from django.core.management.commands.shell import Command as ShellCommand
import os
class Command(ShellCommand):
shells = ShellCommand.shells.append('ptpython')
def ptpython(self):
try:
# old ptpython
m,s,c,p;
main(v){
for(;~(v=getchar());p=v)
if(m)
m=v^47||p^42;
else if(s)
s=v!=10;
else if(p^47)
c+=v^9&&v^10;
@KartikTalwar
KartikTalwar / Documentation.md
Last active May 9, 2024 12:59
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs