Skip to content

Instantly share code, notes, and snippets.

View tangentsoft's full-sized avatar

Warren Young tangentsoft

View GitHub Profile
@tangentsoft
tangentsoft / hash-test.md
Last active September 19, 2021 02:18
A test of GFM's handling of the # character

#Header?

Header!

Post reference:

#1

@tangentsoft
tangentsoft / backup-lrcat
Last active August 29, 2015 14:20
Lightroom 6 re-compressing backup script
#!/bin/bash
# This script re-compresses an Lr6 zipped lrcat file using xz, which is
# much more efficient. Oddly, it's actually more compatible, since Lr6.0
# uses a variant of Zip that won't even open using built-in OS X utilities.
# Open Lightroom and wait for it to exit. You must then say Cmd-Opt-,
# and tell Lr to "back up catalog when Lightroom next exits", then
# exit. If Lr is already running, this will just wait, so it is not
# important whether you run this script before or after Lr is running.
#
let tickTock() =
for i = 0 to 10 do
if i % 2 = 0 then
printfn "tick %d" i
else
printfn "tock %d" i
tickTock()
System.Console.ReadLine() |> ignore
@tangentsoft
tangentsoft / gist:57ce984f768e77bacb30
Last active August 29, 2015 14:17
A wild hack at making [jpegtran](http://jpegclub.org/jpegtran/) white-pad images when extending them, instead of using middle gray
--- transupp.c.orig 2015-03-16 11:34:25.000000000 -0600
+++ transupp.c 2015-03-16 11:39:12.000000000 -0600
@@ -130,6 +130,9 @@
JBLOCKARRAY src_buffer, dst_buffer;
jpeg_component_info *compptr;
+ JCOEF pad = 1023; /* max for 8-bit JPEG = white; use 16383 for 12-bit JPEG */
+ int pio, pii; /* padding indices for custom FMEMZERO() replacments */
+
MCU_cols = srcinfo->output_width /