Skip to content

Instantly share code, notes, and snippets.

@Jacajack
Last active November 10, 2019 21:20
Show Gist options
  • Save Jacajack/1d9717ff7368ae1d1645a52365f9d391 to your computer and use it in GitHub Desktop.
Save Jacajack/1d9717ff7368ae1d1645a52365f9d391 to your computer and use it in GitHub Desktop.
Cool commands I keep forgetting about

Cool commands I keep forgetting about

  • pandoc file.md -t beamer -o out.pdf - create beamer presentation from markdown file
  • nm - list symbols from object file
  • sending file with Xmodem (requires lrzsz):
    • screen /dev/tty* 115200
    • Ctrl + A, :exec !! sx file.txt
  • sudo getty -L 115200 ttyUSB0 vt102 - terminal over serial line (persistent)
  • objdump -D -b binary -mi386 -Maddr16,data16 -Mintel file.bin - disassemble raw 16-bit i386 binary file with Intel syntax
  • ffmpeg ... -vcodec hevc_nvenc/h264_nvenc - use Nvidia GPU for video encoding with ffmpeg
  • echo "file.txt" | entr command - run command each time file changes
  • ffmpeg -i in.mp4 -vcodec libx264 -acodec aac out.mp4 - encode video for Whatsapp
  • ffmpeg ... -ss hh:mm:ss -t hh:mm:ss - trim video
  • openocd -f interface/stlink-v2.cfg -f target/stm32f4x_stlink.cfg -c "program main.elf verify reset exit" - OpenOCD one-liner
  • openocd -f board/stm32f4discovery.cfg -c "program main.elf verify reset exit" - or even better one
  • echo "test" | ssh -enone u@remote "tr a-z A-Z" - use ssh like nc
  • wget --mirror --convert-links --adjust-extension --page-requisites --no-parent http://example.org - mirror website
  • wget -q -O - - supress the stupid output from wget and output data on stdout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment