Skip to content

Instantly share code, notes, and snippets.

# To mark packages as auto-installed on debianish
# List packages that are installed and are not essential and are not marked auto
aptitude search '~i!~E!~M' > a
aptitude markauto <pkgs...>
aptitude unmarkauto <pkgs...>
# Makefile for bulk mjpeg processing from my camera
OPTIONS = -vf $(FILTERS) $(MORE) -of avi -ovc xvid -xvidencopts bitrate=-500000
OPT_SOUND = -oac twolame
OPT_NOSOUND = -nosound
FILTERS = $(OPT_NOROTATE)
OPT_RRIGHT = rotate=1,pp=ac/al
OPT_RLEFT = rotate=2,pp=ac/al
OPT_NOROTATE = pp=ac/al
#!/bin/sh
# MEncoder nonsense
# MJPEG video input, and I stupidly rotated the camera while taking the movie.
# Not sure how to make transcode do JPEG decoding without amplifying noise.
# Thus: MEncoder
# Need forceidx because mjpeg isn't seekable in the typical fashion
# Clip off 4.4 seconds from beginning, then rotate it 90 degrees CCW and expand
# it to 640x640 (to account for rotation).
// Useful snippets for debugging floating-point calculations in c/c++
//
#include <fenv.h>
// Make fpu signal FPE on a NaN being generated by an expression
feenableexcept(FE_INVALID);
// Others
#!/bin/cat
# Useful GCC Debugging Things
# List optimizations enabled/disabled by O2
gcc -O2 -Q --help=opt
# List all automatically-defined symbols
gcc -E -dM - < /dev/null
# List all symbols defined by stdio.h