This file contains 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
// 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" | |
}, |
This file contains 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
# 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 |
This file contains 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
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; |
This file contains 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
# 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 |
This file contains 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
# https://serverfault.com/a/215027 | |
Host database | |
HostName <real IP address or hostname here> | |
User username |
This file contains 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
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); |
This file contains 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
window.onerror("TestRollbarError: testing window.onerror", window.location.href) |
This file contains 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
# https://unix.stackexchange.com/questions/346917/rename-files-to-add-leading-zeros-to-numbers | |
rename -e 's/\d+/sprintf("%02d",$&)/e' -- *.jpg |
This file contains 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
const hasChange = (prevState: RootState, newState: RootState): ((prop: string) => boolean) => ( | |
propertyPath: string, | |
): boolean => { | |
const path = propertyPath.split('.'); | |
try { | |
const oldProp = path.reduce((prop): unknown => prevState[prop], prevState); | |
const newProp = path.reduce((prop): unknown => newState[prop], prevState); | |
return oldProp === newProp; | |
} catch (e) { | |
return false; |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width" /> | |
<title>Flexbox Single Line Form</title> | |
<style type="text/css" media="screen"> | |
html { | |
box-sizing: border-box; | |
} |
NewerOlder