Skip to content

Instantly share code, notes, and snippets.

@xinshangshangxin
xinshangshangxin / m3u8-to-mp4.md
Created Sep 12, 2017 — 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
@xinshangshangxin
xinshangshangxin / alfred-pinyin.py
Created Sep 22, 2016 — forked from tiann/alfred-pinyin.py
make alfred support pinyin search
View alfred-pinyin.py
#! /usr/bin/python
# -*- coding: utf-8 -*-
# @author weishu @2015/12/7
import subprocess
import os
import re
import json
@xinshangshangxin
xinshangshangxin / hexo3_speed_up
Last active Oct 22, 2017
检测md文件,在没有语言说明符的代码段后面加上 类似`js` 的说明符;(Hexo 3 中的 highlight.js 会试图分析 ``` 中的代码内容可能属于哪种语言,内容越长,分析时间就越长)
View hexo3_speed_up
var fs = require('fs');
var path = require('path');
var userPath = path.resolve(process.argv[2] || './');
var codeStyle = process.argv[3] || 'js';
explorer(userPath);
function explorer(path) {
fs.stat(path, function(err, stat) {
if (err) {
You can’t perform that action at this time.