Skip to content

Instantly share code, notes, and snippets.

View VadimBrodsky's full-sized avatar

Vadim Brodsky VadimBrodsky

View GitHub Profile
You're trapped in a haunted mansion with the character. You need to find a way to escape before it’s too late
You are a spy attending a royal masquerade ball and you meet the character, who happens to be royalty, during a dance. Will they discover your secret?
You are an assassin who has been tasked to take the character out. Will you succeed? Will the character convince you not to? Or will the character take you out first?
You and the character have been stranded on a deserted island with limited supplies. Can you survive and find a way back to civilization?
You and your favorite character have been cursed and transformed into animals. Can you find a way to break the curse and return to your human form before it becomes permanent?
@VadimBrodsky
VadimBrodsky / chatgpt.init.lua
Last active March 25, 2025 02:35
AI init.lua for Neovim
-----------------------------------------------------------
-- init.lua - Neovim configuration for Terminal & VSCode --
-----------------------------------------------------------
-- This configuration uses lazy.nvim as the plugin manager,
-- sets up Treesitter, LSP, and several useful plugins.
-- It is designed to be simple, maintainable, and easy to extend.
-----------------------------------------------------------
-- 1. Bootstrap lazy.nvim if not already installed
-----------------------------------------------------------
@VadimBrodsky
VadimBrodsky / keybindings.json
Last active October 26, 2021 16:20
vscode settings
// Place your key bindings in this file to override the defaults
[
{
"key": "ctrl+h",
"command": "workbench.action.focusLeftGroup"
},
{
"key": "ctrl+j",
"command": "workbench.action.focusAboveGroup"
},
@VadimBrodsky
VadimBrodsky / files.txt
Last active January 21, 2021 03:56
ffmpeg concat
# ffmpeg -f concat -safe 0 -i files.txt -codec copy output.mov
# ffmpeg -safe 0 -f concat -segment_time_metadata 1 -i file.txt -vf select=concatdec_select -af aselect=concatdec_select,aresample=async=1 out.mp4
# ffmpeg -i "concat:source-1-int.ts|source-2-int.ts|source-3-int.ts" -c copy output.ts
# ffmpeg -f concat -safe 0 -i files.txt -c copy -bsf:v h264_mp4toannexb -f mpegts output-transcode.ts
# https://stackoverflow.com/questions/15908328/ffmpeg-to-combine-two-mov-files-from-iphone
# ffmpeg -i input1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts
# ffmpeg -i input2.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts
# ffmpeg -i "concat:intermediate1.ts|intermediate2.ts" -c copy -bsf:a aac_adtstoasc output.mp4
@VadimBrodsky
VadimBrodsky / VidyardEmbed.tsx
Created November 17, 2020 23:32
Example of a React component wrapping the Vidyard Embed V4 API
import * as React from 'react';
import * as vidyardEmbed from '@vidyard/embed-code';
import ErrorBoundary from './error-boundary';
type VidyardPlayer = typeof vidyardEmbed['players'][0];
export interface Props {
api?: (player: VidyardPlayer, api: typeof vidyardEmbed.api) => unknown;
aspect?: 'portrait' | 'landscape' | number;
maxHeight?: string;
@VadimBrodsky
VadimBrodsky / new-server.sh
Created October 11, 2020 00:26
docker server
# Add user
# https://www.digitalocean.com/community/tutorials/how-to-create-a-new-sudo-enabled-user-on-ubuntu-20-04-quickstart
adduser vadim
usermod -aG sudo vadim
# Copy over the keys
# https://askubuntu.com/questions/1218023/copying-ssh-key-from-root-to-another-user-on-same-machine
sudo cp /root/.ssh/authorized_keys /home/$USER/.ssh/authorized_keys
sudo chown -R $USER:$USER /home/$USER/.ssh
sudo chmod 600 /home/$USER/.ssh/authorized_keys
@VadimBrodsky
VadimBrodsky / config
Created August 8, 2020 14:10
.ssh/config
# https://serverfault.com/a/215027
Host database
HostName <real IP address or hostname here>
User username
@VadimBrodsky
VadimBrodsky / App.js
Created August 7, 2020 02:40
RecordRTC React Example
import React, { useState, useRef, useEffect } from 'react';
import './App.css';
import RecordRTC, { invokeSaveAsDialog } from 'recordrtc';
function App() {
const [stream, setStream] = useState(null);
const [blob, setBlob] = useState(null);
const refVideo = useRef(null);
const recorderRef = useRef(null);
window.onerror("TestRollbarError: testing window.onerror", window.location.href)
@VadimBrodsky
VadimBrodsky / command.sh
Last active November 10, 2019 01:28
Pad Zeroes to File Name
# https://unix.stackexchange.com/questions/346917/rename-files-to-add-leading-zeros-to-numbers
rename -e 's/\d+/sprintf("%02d",$&)/e' -- *.jpg