Skip to content

Instantly share code, notes, and snippets.

void hexdump(unsigned char *data, size_t size) {
char ascii[17] = {0};
size_t i;
for (i = 0; i < size; ++i) {
unsigned char c = data[i];
size_t next = i+1;
printf("%02X ", c);
ascii[i % 16] = isprint(c) ? c : '.';
if (next % 8 == 0 || next == size) {
@droogie
droogie / jwplayer_downloader.py
Last active April 24, 2023 01:59 — forked from iluxonchik/jwplayer_downloader.py
Download JWPlayer .ts files, merge them into a single file and then convert the file to .mp4
"""
Update URL/Filename, execute script and provide output filename as parameter
Requirements:
* Python 3.x
* "ffmpeg" command-line tool.
"""
import sys
import urllib.request
from os import system, remove
@droogie
droogie / Android.mk
Last active March 19, 2022 01:17 — forked from phhusson/omx-store.cpp
List OMX codecs through treble HAL
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := omx-store.cpp
LOCAL_SHARED_LIBRARIES := libutils liblog android.hardware.cas.native@1.0 android.hardware.media.omx@1.0 libcutils \
android.hardware.cas.native@1.0 \
android.hardware.graphics.allocator@2.0 \
libhidlbase libbase