Skip to content

Instantly share code, notes, and snippets.

Avatar

fangxlmr fangxlmr

View GitHub Profile
@fangxlmr
fangxlmr / m3u8-to-mp4.md
Created May 30, 2022 — forked from tzmartin/m3u8-to-mp4.md
m3u8 stream to mp4 using ffmpeg
View m3u8-to-mp4.md

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 Feb 1, 2021
A collection of binay-to-text tools.
View binary-to-text-tools.md

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 Mar 22, 2019
Linked list issue solved in Python3
View LinkedList.py
# 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: