This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style> | |
html, body { | |
margin: 0; | |
width: 100%; | |
height: 100% | |
} | |
body { | |
display: flex; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -x | |
# ... | |
CONFIG_ARGS=( | |
--target-os=none # use none to prevent any os specific configurations | |
--arch=x86_32 # use x86_32 to achieve minimal architectural optimization | |
--enable-cross-compile # enable cross compile | |
--disable-x86asm # disable x86 asm | |
--disable-inline-asm # disable inline asm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -x | |
ARGS=( | |
--host=i686-gnu # use i686 gnu | |
--enable-static # enable building static library | |
--disable-cli # disable cli tools | |
--disable-asm # disable asm optimization | |
--extra-cflags="-s USE_PTHREADS=1" # pass this flags for using pthreads | |
) | |
emconfigure ./configure "${ARGS[@]}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const Module = require('./dist/ffmpeg-core'); | |
Module.onRuntimeInitialized = () => { | |
const data = Uint8Array.from(fs.readFileSync('./flame.avi')); | |
Module.FS.writeFile('flame.avi', data); | |
const ffmpeg = Module.cwrap('proxy_main', 'number', ['number', 'number']); | |
const args = ['ffmpeg', '-hide_banner', '-report', '-i', 'flame.avi', 'flame.mp4']; | |
const argsPtr = Module._malloc(args.length * Uint32Array.BYTES_PER_ELEMENT); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const Module = require('./dist/ffmpeg-core'); | |
Module.onRuntimeInitialized = () => { | |
const data = Uint8Array.from(fs.readFileSync('./flame.avi')); | |
Module.FS.writeFile('flame.avi', data); | |
const ffmpeg = Module.cwrap('proxy_main', 'number', ['number', 'number']); | |
const args = ['ffmpeg', '-hide_banner']; | |
const argsPtr = Module._malloc(args.length * Uint32Array.BYTES_PER_ELEMENT); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Module = require('./dist/ffmpeg-core'); | |
Module.onRuntimeInitialized = () => { | |
const ffmpeg = Module.cwrap('proxy_main', 'number', ['number', 'number']); | |
const args = ['ffmpeg', '-hide_banner']; | |
const argsPtr = Module._malloc(args.length * Uint32Array.BYTES_PER_ELEMENT); | |
args.forEach((s, idx) => { | |
const buf = Module._malloc(s.length + 1); | |
Module.writeAsciiToMemory(s, buf); | |
Module.setValue(argsPtr + (Uint32Array.BYTES_PER_ELEMENT * idx), buf, 'i32'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -x | |
# verify Emscripten version | |
emcc -v | |
# configure FFMpeg with Emscripten | |
CFLAGS="-s USE_PTHREADS -O3" | |
LDFLAGS="$CFLAGS -s INITIAL_MEMORY=33554432" # 33554432 bytes = 32 MB | |
CONFIG_ARGS=( | |
--target-os=none # use none to prevent any os specific configurations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
## I don't have any devices running Android OS now. These settings may have been outdated but I cannot verify it. | |
adb shell settings put global captive_portal_fallback_url http://g.cn/generate_204 | |
adb shell settings put global captive_portal_http_url http://www.google.cn/generate_204 | |
adb shell settings put global captive_portal_https_url https://www.google.cn/generate_204 | |
adb shell settings put global captive_portal_other_fallback_urls http://www.qualcomm.cn/generate_204 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# UPDATED 17 February 2019 | |
# Redirect all HTTP traffic to HTTPS | |
server { | |
listen 80; | |
listen [::]:80; | |
server_name www.domain.com domain.com; | |
return 301 https://$host$request_uri; | |
} | |
# SSL configuration |
NewerOlder