Skip to content

Instantly share code, notes, and snippets.

@andreibosco
andreibosco / creative-cloud-disable.md
Last active December 19, 2024 08:28
disable creative cloud startup on mac
@jpalala
jpalala / react_samples_list.md
Last active November 12, 2024 04:10 — forked from leecade/react_samples_list.md
React Samples List
@tzmartin
tzmartin / m3u8-to-mp4.md
Last active December 24, 2025 06:37
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
def findSchedules(workHours, dayHours, pattern):
totalHours = 0
result = []
for c in pattern:
if c != '?':
totalHours = totalHours + int(c)
diff = workHours - totalHours
constructResult(list(pattern), 0, diff, dayHours, result)
return result
@RuolinZheng08
RuolinZheng08 / backtracking_template.py
Last active March 30, 2026 00:56
[Algo] Backtracking Template & N-Queens Solution
def is_valid_state(state):
# check if it is a valid solution
return True
def get_candidates(state):
return []
def search(state, solutions):
if is_valid_state(state):
solutions.append(state.copy())