Skip to content

Instantly share code, notes, and snippets.

View david-wm-sanders's full-sized avatar
🖋️
up late

David Sanders david-wm-sanders

🖋️
up late
View GitHub Profile
@david-wm-sanders
david-wm-sanders / ffmpeg_ffprobe_command
Last active March 19, 2024 02:12
ffmpeg: ffprobe: get video width and height
ffprobe -v error -show_entries stream=width,height -of default=noprint_wrappers=1:nokey=1 input
@david-wm-sanders
david-wm-sanders / ffmpeg_chopvid_command
Last active March 24, 2017 04:11
ffmpeg: chop a video into image frames (10/s)
ffmpeg -i input -r 10 image-%03d.jpg
@david-wm-sanders
david-wm-sanders / ffmpeg_merge_command
Created March 24, 2017 04:16
ffmpeg: merge the first(0) video stream from first(0) input and the first(0) audio stream from the second(1) input to create the output
ffmpeg -i videoin -i audioin -map 0:v:0 -map 1:a:0 output
# Select an encoder (when used before an output file) or a decoder (when used before an input file) for one or more streams.
ffmpeg -i videoin -i audioin -c:v copy -c:a aac -strict experimental -map 0:v:0 -map 1:a:0 output
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 4.
utc,tp,gv,k,d,tk,ks,td,vd,sh,dm,sf,tt,rp,ds,kc
2017-04-07 01:51:04.818525+00:00,362877,103,15075,1187,239,259,91,84,39,320773.718750,110697,454,7.602916,6,"3:415,4:131,5:64,6:22,7:16,8:13,9:6,10:7,11:6,12:4,13:3,14:6,15:3,16:4,17:3,18:1,19:3,20:2,21:2,22:2,23:0,24:1,25:1,26:2,27:1,28:0,29:0,30:0,31:0,32:0,33:0,34:1,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:1"
2017-04-07 02:26:20.303417+00:00,364857,103,15216,1188,240,259,93,85,39,322035.531250,111031,454,7.655042,6,"3:420,4:132,5:66,6:22,7:16,8:13,9:6,10:7,11:6,12:4,13:3,14:6,15:3,16:4,17:3,18:1,19:3,20:2,21:2,22:2,23:0,24:1,25:1,26:2,27:1,28:0,29:0,30:0,31:0,32:0,33:0,34:1,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:1"
2017-04-07 02:54:28.737183+00:00,365906,103,15280,1188,240,259,94,86,39,323240.906250,111211,454,7.702271,6,"3:422,4:132,5:68,6:22,7:16,8:13,9:6,10:7,11:6,12:4,13:3,14:6,15:3,16:4,17:3,18:1,19:3,20:2,21:2,22:2,23:0,24:1,25:1,26:2,27:1,28:0,29:0,30:0,31:0,32:0,33:0,34:1,35:0,
@david-wm-sanders
david-wm-sanders / pipfreeze
Created September 4, 2017 01:20
Powershell Command to pip freeze properly
.\venv\Scripts\pip freeze | Out-File -Encoding UTF8 requirements.txt

apt-get download will download the package, but not its dependencies, to the current directory.
Use if you want to download a .deb to then tinker with it (uncompress it, poke at it with dpkg, whatever).

apt-get -d install will download the given package and all missing dependencies to the system packages directory (/var/cache/apt/archives).
Use the second if you want to "pre-download" a set of packages for later installation.

(Derived from a comment on askubuntu: https://askubuntu.com/questions/463380/difference-between-apt-get-d-install-apt-get-download/463391#463391)

mkisofs -JRl -o /path/to/output.iso /path/to/input/dir

Section "Monitor"
Identifier "Virtual1"
Modeline "2560x1440_60.00" 312.25 2560 2752 3024 3488 1440 1443 1448 1493 -hsync +vsync
Option "PreferredMode" "2560x1440_60.00"
EndSection
Section "Device"
Identifier "vmwarescreen"
Driver "vmware"
EndSection
sudo dd if=/dev/sdb conv=sync,noerror bs=64K status=progress | gzip -c > /mnt/hgfs/vmwareshare/ubuntu_server_16.04.img
sudo fdisk -l /dev/sdb > /mnt/hgfs/vmwareshare/us_16.04_list_fdisk.info
@david-wm-sanders
david-wm-sanders / hotkeys.xml
Last active August 26, 2020 04:33
rwr hotkeys
<hotkeys>
<hotkey index="0" text="Please accept my sincerest apologies :S" />
<hotkey index="1" text="Enemy reinforcements incoming! Take up cover!" />
<hotkey index="2" text="Enemy vehicle incoming! Ready your rockets!" />
<hotkey index="3" text="Enemy strike incoming! Spread out!" />
<hotkey index="4" text="My insides are outsides! Please help me by poking my insides back in!" />
<hotkey index="5" text="Thank you kindly sir :)" />
<hotkey index="6" text="Please rescue my rares :P" />
<hotkey index="7" text="Gunship inbound - let's all run in like gunsheep!" />
<hotkey index="8" text="Artillery strikes incoming - ignore the circle at your own peril!" />