Skip to content

Instantly share code, notes, and snippets.

View dixonge's full-sized avatar

Glenn Dixon dixonge

View GitHub Profile
@dixonge
dixonge / Remux-.ts-file-into-.mp4-file.txt
Created December 2, 2023 23:13
Remux .ts file into .mp4 file
ffmpeg -i videofilename.ts -acodec copy -vcodec copy videofilename.mp4
@dixonge
dixonge / Concatenate-multiple-ts-files-into-one.txt
Last active December 2, 2023 23:11
Concatenate-multiple-ts-files-into-one
cat *.ts* >> videofilename.ts
@dixonge
dixonge / regex-first-line.txt
Last active May 13, 2022 11:59
Restrict regex search to first line of document
// This substitutes for \A which doesn't work
(?<!\n)^
@dixonge
dixonge / xmp-title-to-description
Created April 24, 2022 13:34
Copy xmp title to xmp description
exiftool "-Xmp:Description<Xmp:Title" -ext jpg ~/Pictures/Photos\ -\ DSLR\ Import/*
@dixonge
dixonge / DupeFoldersOnly
Created March 10, 2021 13:06
Duplicate multiple folders to another location without files - bash/zsh
find . -type d -exec mkdir -p OtherFolder/{} \;
@dixonge
dixonge / Twitter-search-with-filters
Last active September 30, 2022 18:06
Twitter search/filters
https://twitter.com/search?q=since%3A2021-01-05%20(filter%3Avideos%20OR%20filter%3Aimages)%20until%3A2021-01-07%20geocode%3A38.887163118%2C-77.005333312%2C1km&src=typed_query&f=live
@dixonge
dixonge / VSCode-Regex-Search-Replace-Markdown-Images
Last active March 23, 2023 01:20
Regex to find markdown images and replace with img tag in VS Code (or template engine shortcode, etc.)
Find: !\[(.*?)\]\((.*?)\)
Replace: <img alt="$1" src="$2">
@dixonge
dixonge / Download-articles-from-paywalled-sites
Created April 2, 2020 17:05
Download articles from even paywalled web sites (like Medium or Wired)
wget -m -np --page-requisites --adjust-extension --convert-links <web site link>
@dixonge
dixonge / VS-Code-Regex-find-line-beginning-with-specific-text-append-end-of-line
Created April 2, 2020 17:02
VS Code Regex to find line beginning with specific text and append to end of line
Find: ^(find-this.*)
Replace: $1append-this
@dixonge
dixonge / Rename-folders-moving-date-from-end-to-beginning-of-folder-name
Created April 2, 2020 17:00
Rename folders by moving date from end to beginning of folder name
rename -v -- 's/^(.*)-(\d{4})-(\d{2})-(\d{2})/$2-$3-$4-$1/' *