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
{ | |
"$schema": "https://jsonresume.org/schema.json", | |
"basics": { | |
"name": "Simon Flack", | |
"label": "Product Engineer – Full-stack (TypeScript, Node, React)", | |
"location": { | |
"city": "Jelenia Góra", | |
"countryCode": "PL" | |
}, | |
"profiles": [ |
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
VIDEO=~/Downloads/video.mp4 \ | |
SRT=/Users/simon/Downloads/video.srt \ | |
OUTPUT=~/Downloads/video-with-subtitles.mp4 \ | |
ffmpeg -i $VIDEO \ | |
-vf "crop=360:640:(iw-370)/2:(ih-640)/2,subtitles=${SRT}:force_style='FontSize=14,MarginV=20'" \ | |
-c:a copy $OUTPUT |
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 | |
input_file="$1" | |
dir_name=$(dirname "$input_file") | |
base_name=$(basename "$input_file") | |
output_file="$dir_name/cropped_$base_name" | |
# Fetch video dimensions | |
width=$(ffprobe -v error -select_streams v:0 -show_entries stream=width -of default=nw=1:nk=1 "$input_file") | |
height=$(ffprobe -v error -select_streams v:0 -show_entries stream=height -of default=nw=1:nk=1 "$input_file") |
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
/** | |
* This is incomplete, but it attempts to remove special formatting before logging. | |
* This is useful because some runtimes like Sentry which intercept console.log | |
* Do not support all the console.log features available in the browser | |
* | |
* @see https://developer.chrome.com/docs/devtools/console/format-style/ | |
*/ | |
function debug(...params: Parameters<(typeof console)['log']>) { | |
if (process.env.NODE_ENV === 'development') { |
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
type Duration = "0-2" | "2-5" | "5+" | |
type FilterQuery = { | |
durations: Set<Duration>, | |
authors: Set<string>, | |
tags: Set<number> | |
} | |
type CurriedReactHandler<Model> = <T extends keyof Model>( | |
type: T, |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
send( | |
{ | |
type: "APPRECIATION_RECOGNISED", | |
for: [ | |
"XState", // game-changer | |
"use-effect-reducer", // so useful | |
"@keyframers", // educational | |
"tweets", // hilarious, keep 'em coming | |
], | |
}, |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions | |
// - XState (all XState exports) |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
NewerOlder