70 lines
2.4 KiB
Plaintext
70 lines
2.4 KiB
Plaintext
; TODO: More ffmpeg, yt-dlp
|
|
|
|
% nixos, nixos-rebuild
|
|
# Rebuild a flake system derivation
|
|
sudo nixos-rebuild <type> --flake .#<flake>
|
|
$ type: echo -e "switch\nbuild\nboot"
|
|
$ flake: echo -e "nixinator\nnixtop"
|
|
|
|
% nixos, nix-store, closure, dependency
|
|
# Find out why a package is included in the closure when building the system derivation
|
|
nix why-depends /run/current-system nixpkgs#<package>
|
|
|
|
; TODO: Autocomplete executable, list everything in path
|
|
% nixos, nix-store, storepath, link
|
|
# Find the storepath of an executable in the users path
|
|
readlink -f $(which <executable>)
|
|
|
|
; TODO: Autocomplete executable, list everything in path
|
|
% nixos, nix-store, storepath, libraries
|
|
# Find the wanted dynamic libraries of an executable in the users path
|
|
ldd $(readlink -f $(which <executable>))
|
|
|
|
% shell, process
|
|
# Launch a detached process with suppressed output
|
|
<command> &>/dev/null &
|
|
|
|
; TODO: Filter out directories from input autocomplete (if there are no directories basic grep doesn't work, always needs a pattern)
|
|
% ffmpeg, slowmo
|
|
# Create a slow motion version of a video with interpolated/blended frames
|
|
ffmpeg -i <input> -filter:v "minterpolate='mi_mode=mci:mc_mode=aobmc:vsbmc=1:fps=<doublefps>',setpts=2*PTS" output.mp4
|
|
$ input: exa -1
|
|
|
|
% ffmpeg, cropdetect
|
|
# Detect black bar dimensions automatically by looking at the first 10 frames
|
|
ffmpeg -i <input> -vframes 10 -vf cropdetect -f null -
|
|
$ input: exa -1
|
|
|
|
% ffmpeg, cropdetect, preview
|
|
# Preview video with applied crop settings
|
|
ffplay -vf crop=<width>:<height>:<x>:<y> <input>
|
|
$ input: exa -1
|
|
|
|
% ffmpeg, cropdetect, render
|
|
# Re-encode the video with applied crop settings
|
|
ffmpeg -i <input> -vf crop=<width>:<height>:<x>:<y> -c:a copy output.mp4
|
|
$ input: exa -1
|
|
|
|
% qemu, cpu
|
|
# Find out what features are supported by different qemu CPUs
|
|
qemu-system-<arch> -cpu help
|
|
|
|
; https://github.com/flathub/com.discordapp.Discord/wiki/Rich-Precense-(discord-rpc)
|
|
% discord, flatpak, rich-presence
|
|
# Enable rich presence for flatpak Discord
|
|
ln -sf $XDG_RUNTIME_DIR/{app/com.discordapp.Discord,}/discord-ipc-0
|
|
|
|
% find
|
|
# Find files under a certain size in the current directory
|
|
find . -type f -name "<glob>" -size -<size>
|
|
|
|
% objdump, disassemble
|
|
# Disassemble an object file
|
|
objdump -d -S -M intel "<file>" | bat -l nasm
|
|
$ file: exa -1
|
|
|
|
% pdftocairo, pdf, svg
|
|
# Extract svg figure from pdf page
|
|
pdftocairo -f <page> -l <page> -svg "<input>" "<output>"
|
|
$ input: exa -1
|