Skip to content

Instantly share code, notes, and snippets.

rm -f src/gitversion.h.in
echo "#ifndef PROF_GIT_BRANCH" >> src/gitversion.h.in
echo "#define PROF_GIT_BRANCH \"master\"" >> src/gitversion.h.in
echo "#endif" >> src/gitversion.h.in
echo "#ifndef PROF_GIT_REVISION" >> src/gitversion.h.in
echo "#define PROF_GIT_REVISION \"4966162\"" >> src/gitversion.h.in
echo "#endif" >> src/gitversion.h.in
cp src/gitversion.h.in src/gitversion.h
make all-am
make[1]: Entering directory '/home/orz/sauce/zzz_not_dev/profanity'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
# Since this is Upstart 0.6.5,
# setuid, setgid, console directives do not work.
# I'm using daemonize to compensate.
# see http://software.clapper.org/daemonize/daemonize.html
# daemonize forks once, so 'expect fork' is needed
description "An Upstart 0.6.5 script for running a headless minecraft server"
start on filesystem or runlevel [2345]
stop on runlevel [!2345]
@lordastley
lordastley / gist:5127027
Last active March 1, 2024 09:45
1-bit dithering a video
ffmpeg -i input.mp4 -s hd480 -f image2 img-%4d.png # dump the video to .png images, 480p
for i in *.png; do convert $i -colorspace Rec709Luma pgm:- | pamditherbw -atkinson | pnmtopng > p$i; done; # convert .png images to 1-bit dithered .pngs
ffmpeg -r [orig. framerate] -i pimg-%4d.png -i input.mp4 -map 0:0 -map 1:1 -c:a copy -c:v libx264 -tune stillimage -crf 18 -r 24 lol.mkv
#take dithered png files, original video's audio, make a video with x264, tuned for still images and a copy of the audio. specify frame rate for proper a/v sync
# -map 1:1 maps audio from 2nd input (orig video) to audio of new video. assumes stream 1 is desired audio track. check this.
@lordastley
lordastley / gist:1721340
Created February 2, 2012 03:54
Kill Microsoft Word "Smart" Quotes and other fancy characters from text files.
s/[\x93\x94]/\"/g
s/[\x91\x92]/\'/g
s/[\x95\xa6]/\*/g
s/[\x85\x96\x97]/\-/g
Works in sed, vim, etc.
@lordastley
lordastley / Atkinson dither in PHP
Created November 6, 2011 09:08
1-bit Atkinson dither in PHP with GD
<?php
$img = imagecreatefromjpeg('./delayclose.jpg');
imagefilter($img, IMG_FILTER_GRAYSCALE);
$width = imagesx($img);
$height = imagesy($img);
$img_arr = array();
// Parse image (can be combined with dither stage, but combining them is slower.)