for %f in (*.mp4) do @ffprobe -v error -of csv -show_entries format=filename:format_tags=title %f >> list.txt
ffmpeg -i <input-file> -preset fast -crf 18 -vf scale=720:-2 -an output.mp4
flags:
- scales to 720 x \
#!/bin/bash -e | |
modprobe libcomposite | |
cd /sys/kernel/config/usb_gadget/ | |
mkdir g && cd g | |
echo 0x1d6b > idVendor # Linux Foundation | |
echo 0x0104 > idProduct # Multifunction Composite Gadget | |
echo 0x0100 > bcdDevice # v1.0.0 |
public static String hexdump(byte[] data) { | |
final int perRow = 16; | |
final String hexChars = "0123456789ABCDEF"; | |
StringBuilder dump = new StringBuilder(); | |
StringBuilder chars = null; | |
for (int i = 0; i < data.length; i++) { | |
int offset = i % perRow; | |
if (offset == 0) { | |
chars = new StringBuilder(); |
diff -ur firmware/Makefile firmware-new/Makefile | |
--- firmware/Makefile 2011-05-28 15:57:49 +0800 | |
+++ firmware-new/Makefile 2017-07-16 01:12:03 +0800 | |
@@ -7,7 +7,7 @@ | |
# TARGET=atmega8 HFUSE=0xc9 LFUSE=0xef | |
# TARGET=atmega48 HFUSE=0xdd LFUSE=0xff | |
# TARGET=at90s2313 | |
-TARGET=atmega8 | |
+TARGET=atmega88 | |
HFUSE=0xc9 |
#!/usr/bin/python2 | |
# | |
# script to generate a minicom script that dumps entire flash | |
# problem is the stub seems to read all data into RAM first, | |
# so you can only do in batches | |
# | |
# 2019.10.24 | |
# inc needs to be low enough to complete within `expect` timeout | |
inc = 0x20000 |
// un-download any unwatched episodes | |
// this problem was created during initial Trakt.TV sync and it added everything to the "collection" | |
CRUD.Find('Episode', {}, {'limit': 100000}).then(function(eps) { | |
eps.map(function(ep) { | |
if (ep.hasAired() && !ep.isWatched() && ep.isDownloaded()) { | |
console.log(ep.ID_Serie, ep.getFormattedEpisode(), ep); | |
ep.markNotDownloaded(/*pairing:*/ false); | |
} | |
}) | |
}) |
mpv --no-cache --profile=low-latency --rtsp-transport=tcp rtsp://192.168.0.1/stream |
# moves up file data at current pos to specified to_offset | |
def moveup(f, to_offset, block_size=4096): | |
assert f.tell() > to_offset | |
while True: | |
data = f.read(block_size) | |
newpos = f.tell() | |
f.seek(to_offset) | |
to_offset += len(data) |
// | |
// WSH script to replace all paths in iTunes after moving media files. | |
// iTunes will prompt you to locate missing files, but you need to do them | |
// one by one, which is not humanly feasible. | |
// | |
// run using: cscript.exe itunes-migrate-files.js | |
// | |
// 2022.04.23 darell tan | |
// |
This is a very minimal example for writing your own quick-and-dirty decoder that you can use in PulseView.
This decoder displays annotations for a signal that's made up of 1 ms units. It annotates from one signal edge to another, without regard for time. If you want to handle the actual units of time, more logic is required and that's left as an exercise for the reader.