See metadata (and other data about the file):
ffmpeg -i input.mp4Add metadata to video:
ffmpeg -i input.mp4 -metadata title="My Video Title" \| const data = await (await fetch('Tv-test-pattern-146649_640.png')).bytes(); | |
| const decoder = new ImageDecoder({ type: "image/png", data }); | |
| const frame = await decoder.decode(); | |
| const bytes = new Uint8Array(frame.image.allocationSize()); | |
| await frame.image.copyTo(bytes.buffer); |
| #include <sys/mman.h> | |
| #include <string.h> | |
| #include <stdio.h> | |
| int main() { | |
| /* | |
| This is raw x86-64 machine code for a TINY *leaf function*: | |
| lea eax, [rdi + 1] ; compute (arg + 1) |
This does not currently work.
convert isome.file[-1] -resize 50% -interpolate Bicubic -level 495,210 isome.file.png
| # python3 -mvenv venv && source venv/bin/activate && pip install matplotlib | |
| # python3 make_polygon.py | |
| import matplotlib.pyplot as plt | |
| import math | |
| def make_polygon(vertices): | |
| # compute centroid | |
| average_x = sum([vertex[0] for vertex in vertices]) / len(vertices) | |
| average_y = sum([vertex[1] for vertex in vertices]) / len(vertices) | |
| centroid = [average_x, average_y] |
-a archives recursively
-P shows progress and enables resuming interrupted download
-a compresses
rsync -azP -e 'ssh -p PORT' <user>@<IP>:/path/to/folder .| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Sand</title> | |
| <meta charset="utf-8"> | |
| <link rel="icon" href="data:;base64,iVBORw0KGgo="> | |
| <script type="text/javascript"> | |
| const SAND = 0xEF | 0xDD << 8 | 0x6F << 16 | 0xFF << 24; | |
| const WATER = 0x1C | 0xA3 << 8 | 0xEC << 16 | 0xFF << 24; | |
| let run = true; |
Write a buggy program:
int main() {
int *p = 0;
*p = 42;
return 0;
}Compile it with debug options:
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <stdbool.h> | |
| #include <ctype.h> | |
| #define MAX_LINE_LENGTH 4096 // Max line length for reading input (can be adjusted) | |
| #define INITIAL_CHILDREN_CAPACITY 4 | |
| #define TAB_STOP_WIDTH 4 |