Skip to content

Instantly share code, notes, and snippets.

@vnd
vnd / playback.html
Last active September 21, 2023 08:59
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Video Player</title>
</head>
<body>
<video id="videoPlayer" autoplay>
<source src="1.mp4" type="video/mp4">
@vnd
vnd / 0001-Generate-default-values-for-CPP-code.patch
Created March 24, 2023 07:03
Support for C++ defalt values in quicktype
From a4f6d48471b3398bdd58e3f68a1b34b57275c279 Mon Sep 17 00:00:00 2001
From: Ivan Drobyshevskyi <drobyshevskyi@gmail.com>
Date: Fri, 24 Mar 2023 08:56:22 +0200
Subject: [PATCH] Generate default values for C++ code
---
.../quicktype-core/src/attributes/Default.ts | 80 +++++++++++++++++++
.../src/input/JSONSchemaInput.ts | 7 +-
.../quicktype-core/src/language/CPlusPlus.ts | 52 ++++++++----
3 files changed, 123 insertions(+), 16 deletions(-)
/* Taken from http://www.capstone-engine.org/lang_c.html */
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <inttypes.h>
#include <byteswap.h>
#include <capstone/capstone.h>
/* Taken from http://www.capstone-engine.org/lang_c.html */
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <inttypes.h>
#include <byteswap.h>
#include <capstone/capstone.h>