This file contains hidden or 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
package main | |
import ( | |
"io" | |
"log" | |
"os" | |
"strconv" | |
"time" | |
) |
This file contains hidden or 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
use std::rc::Rc; | |
use std::cell::RefCell; | |
use wasm_bindgen::prelude::*; | |
use wasm_bindgen::{JsValue, JsCast}; | |
use wasm_bindgen::closure::Closure; | |
use web_sys::{ErrorEvent, MessageEvent, WebSocket, BinaryType}; | |
struct State { |
This file contains hidden or 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
// Camera: 192.168.0.11 | |
// NVR: 192.168.0.12 | |
// NVR discovery packet UDP 192.168.0.12:54432 -> 239.255.255.250:3702 | |
// < ? xml version="1.0" encoding="UTF-8" ? > | |
// <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:dn="http://www.onvif.org/ver10/network/wsdl" xmlns:d="http://schemas.xmlsoap.org/ws/2005/04/discovery"> | |
// <SOAP-ENV:Header> | |
// <wsa:MessageID>urn:uuid:36a51323-5566-7788-99aa-2a3f00125c87</wsa:MessageID> | |
// <wsa:To>urn:schemas-xmlsoap-org:ws:2005:04:discovery</wsa:To> |
This file contains hidden or 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
// automatically generated by the FlatBuffers compiler, do not modify | |
use std::mem; | |
use std::cmp::Ordering; | |
extern crate flatbuffers; | |
use self::flatbuffers::EndianScalar; |
This file contains hidden or 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 | |
set -e | |
bitrate=2048k | |
fps=25 | |
ffmpeg \ | |
-i input.mkv `# input file` \ | |
-y `# force overwrite output file` \ | |
-ss 00:17:00 `# start time position` \ |
This file contains hidden or 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/sh | |
muxctrl_reg01=004 # 0: SENSOR_RSTN, 1: GPIO0_5 | |
# muxctrl_reg02=008 # 000: GPIO0_6, 001: FLASH_TRIG, 010: SFC_EMMC_BOOT_MODE, 011: SPI1_CSN1, 100: VI_VS_BT1120 | |
muxctrl_reg03=00C # 000: GPIO0_7, 001: SHUTTER_TRIG, 010: SFC_DEVICE_MODE, 100: VI_HS_BT1120 | |
# muxctrl_reg04=010 # 000: GPIO2_0, 001: RMII_CLK, 011: VO_CLK, 100: SDIO1_CCLK_OUT | |
# muxctrl_reg05=014 # 000: GPIO2_1, 001: RMII_TX_EN, 011: VO_VS, 100: SDIO1_CARD_DETECT | |
# muxctrl_reg06=018 # 000: GPIO2_2, 001: RMII_TXD0, 011: VO_DATA5, 100: SDIO1_CWPR | |
# muxctrl_reg07=01C # 000: GPIO2_3, 001: RMII_TXD1, 011: VO_DE, 100: SDIO1_CDATA1 | |
# muxctrl_reg08=020 # 000: GPIO2_4, 001: RMII_RX_DV, 011: VO_DATA7, 100: SDIO1_CDATA0 |
This file contains hidden or 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
[admin@MikroTik] /interface bridge> export | |
# jun/28/2019 14:03:43 by RouterOS 6.43.10 | |
# software id = 32JT-U887 | |
# | |
# model = RBD52G-5HacD2HnD | |
/interface bridge | |
add admin-mac=74:4D:28:59:45:C9 arp=proxy-arp auto-mac=no comment=defconf name=bridge | |
/interface bridge filter | |
add action=passthrough chain=forward | |
add action=accept chain=forward comment="web admin" dst-port=80 ip-protocol=tcp mac-protocol=ip out-interface=eoip-tunnel1 |
This file contains hidden or 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
import * as fs from 'fs' | |
import {Buf} from './buf' | |
class Font { | |
header: UcsFontHeader | |
// blocks: | |
} | |
class UcsFontHeader { |
This file contains hidden or 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/sh | |
set -e | |
url=rtmp://x.rtmp.youtube.com/live2/ | |
key=m4..-....-....-..fu | |
ffmpeg \ | |
-re -f lavfi -i testsrc=size=1280x720:rate=30 \ | |
-deinterlace -f lavfi -i anullsrc \ | |
-vcodec libx264 -pix_fmt yuv420p -preset veryfast -r 30 -g 60 -b:v "1000k" \ |
This file contains hidden or 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/sh | |
set -e | |
fw_env_path="/etc/fw_env.config" | |
bootargs_param="ubootenv" | |
cmdline=`cat /proc/cmdline` | |
# for testing | |
# cmdline="cmdline mem=128M totalmem=192M sensor=imx222 console=ttyAMA0,115200 phyaddru=0 phyaddrd=1 ubootenv=/dev/mtd1,0x00000,0x40000,0x10000 mtdparts=hi_sfc:320K(uboot),192K(ubootenv),6144K(romfs),5120K(romfail),3072K(app),1536K(config)" |