Skip to content

Instantly share code, notes, and snippets.

@justxor
Created May 31, 2022 06:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justxor/805c14a7ee56b76649b8012eb7dc7d2a to your computer and use it in GitHub Desktop.
Save justxor/805c14a7ee56b76649b8012eb7dc7d2a to your computer and use it in GitHub Desktop.
howdoi print stack trace python
> import traceback
>
> try:
> 1/0
> except:
> print '>>> traceback <<<'
> traceback.print_exc()
> print '>>> end of traceback <<<'
> traceback.print_exc()
$ howdoi convert mp4 to animated gif
> video=/path/to/video.avi
> outdir=/path/to/output.gif
> mplayer "$video" \
> -ao null \
> -ss "00:01:00" \ # starting point
> -endpos 10 \ # duration in second
> -vo gif89a:fps=13:output=$outdir \
> -vf scale=240:180
$ howdoi create tar archive
> tar -cf backup.tar --exclude "www/subf3" www
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment