Skip to content

Instantly share code, notes, and snippets.

View huanle0610's full-sized avatar
🎯
Focusing

huanle0610 huanle0610

🎯
Focusing
  • Shenzhen, China
View GitHub Profile
@huanle0610
huanle0610 / ffmpeg.md
Created January 6, 2020 03:40 — forked from protrolium/ffmpeg.md
using ffmpeg to extract audio from video files

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:

@huanle0610
huanle0610 / Audio.WebAudio.Browser.Compat.md
Created November 28, 2019 10:28 — forked from uupaa/Audio.WebAudio.Browser.Compat.md
Audio, WebAudio, Blob, ArrayBuffer
  1. Audio(url)
  2. Audio(arraybuffer)
  3. Audio(blob)
  4. WebAudio(arraybuffer)
  5. WebAudio(blob)

Audio file access with streaming

http://uupaa.net/issues/3/ の結果

<div id="app">
<v-app id="inspire">
<v-layout row>
<v-flex xs24 sm24>
<v-card>
<v-toolbar color="purple" dark>
<v-toolbar-side-icon></v-toolbar-side-icon>
<v-toolbar-title>2019-04-19会议纪要</v-toolbar-title>
@huanle0610
huanle0610 / index.html
Created April 5, 2018 08:28
vue-antv-test-1
<div id="root">
<v-line />
</div>
Ext.Loader.loadScript({
url: ['resources/codemirror-5.26.0/lib/codemirror.js', 'resources/codemirror-5.26.0/lib/codemirror.css'],
onLoad: function () {
console.log('load ok', arguments);
},
onError: function () {
console.error('load error', arguments);
}
});
@huanle0610
huanle0610 / phprbac_plantuml.php
Created April 24, 2016 23:17
Show phprbac permissions and roles in PlantUML
<?php
require_once 'autoload.php';
require_once 'src/PhpRbac/Rbac.php';
$rbac = new \PhpRbac\Rbac();
function getPermissionUml(&$rbac)
{
$arr = Jf::sql('select * from phprbac_permissions');
echo "title Permissions", "\n";
foreach($arr as $row)
@huanle0610
huanle0610 / parse_nginx_log.php
Created October 7, 2015 12:57
parse nginx log to get primary script unknow requests
<?php
$file = '/var/log/nginx/YOURDOMAIN.error.log';
$fd = fopen ($file, "r");
while (!feof ($fd))
{
$buffer = fgets($fd, 4096);
$lines[] = $buffer;
}
fclose ($fd);
var_dump(count($lines));
@huanle0610
huanle0610 / url_unique.php
Created October 7, 2015 12:52
format after parse the nginx log
<?php
$str = file_get_contents('C:\Users\huanle0610.HL-PC\Desktop\hk.json');
$arr = json_decode($str, 1);
var_dump($arr['items'][0]);
$list =array();
foreach($arr['items'] as $row)
{
$list[] = sprintf('%s %s %s', $row['method'], $row['url'], $row['protocol']);
}
var now = new Date();
var monthnumber = now.getMonth();
var yearnumber = now.getFullYear();
var count = 0;
var months = new Array(13);
months[0] = "Jan";
months[1] = "Feb";
months[2] = "Mar";
months[3] = "Apr";
@huanle0610
huanle0610 / progressbar.html
Created September 11, 2014 02:04
Extjs4.2 Progressbar Multi-segment
<html>
<head>
<meta charset="UTF-8">
<title>Extjs4.2 Progressbar Multi-segment</title>
<link rel="stylesheet"
href="http://cdn.sencha.com/ext/gpl/4.2.0/resources/ext-theme-neptune/ext-theme-neptune-all.css"/>
<script src="http://cdn.sencha.com/ext/gpl/4.2.1/ext-all.js"></script>
<script src="http://cdn.sencha.com/ext/gpl/4.2.1/ext-theme-neptune.js"></script>
<style type="text/css">
#pb{