Skip to content

Instantly share code, notes, and snippets.

@fangxlmr
fangxlmr / m3u8-to-mp4.md
Created May 30, 2022 14:56 — forked from tzmartin/m3u8-to-mp4.md
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
@fangxlmr
fangxlmr / binary-to-text-tools.md
Created February 1, 2021 14:52
A collection of binay-to-text tools.

binary-to-text-tools

  1. base64
  2. base32
  3. uuencode/uudecode
  4. hexdump/hd
  5. xxd/autoxxd
  6. od
  7. xd (on Solaris)
  8. binhex (on Mac)
@fangxlmr
fangxlmr / LinkedList.py
Last active March 22, 2019 10:37
Linked list issue solved in Python3
# Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, x):
# self.val = x
# self.next = None
class LinkedList(object):
def get_middle(self, head: ListNode) -> ListNode:
fast = slow = head
while fast and fast.next: