Skip to content

Instantly share code, notes, and snippets.

@turbod
Created February 21, 2023 08:19
Show Gist options
  • Save turbod/1bd8d44470e77bbbed2498b00b960882 to your computer and use it in GitHub Desktop.
Save turbod/1bd8d44470e77bbbed2498b00b960882 to your computer and use it in GitHub Desktop.
IO.popen(["file", "--brief", "--mime-type", 'test.gif'], in: :close, err: :close) { |io| io.read(35).chomp }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment