Skip to content

Instantly share code, notes, and snippets.

View inferiorhumanorgans's full-sized avatar

inferiorhumanorgans

  • San Francisco, CA
View GitHub Profile
# $FreeBSD$
LIB= pam_exec
SRCS= pam_exec.c
SHLIB_MAJOR= 5
WARNS?= 1
.include <bsd.lib.mk>
extern crate futures;
extern crate tokio_zmq;
extern crate zmq;
use futures::{Future, Sink, Stream};
use std::sync::Arc;
use tokio_zmq::{prelude::*, Multipart as MultipartMessage, Pub};
fn main() {
let ctx = Arc::new(zmq::Context::new());
title = "Leave No Trace"
category = "The Principles"
text = """
Our community respects the environment. We are committed to leaving no physical trace of our activities wherever we gather. We clean up after ourselves and endeavor, whenever possible, to leave such places in a better state than when we found them.
Leave No Trace is considered to be the seventh principle."""
;; Routine scales images based on the two parameters
;; if x-factor > 0 then image width is scaled to that width (if y-factor==0 then keep aspect ratio)
;; if x-factor < 0 then image width is scaled by magnitude of that amount (y-factor==0 means flip horizontally)
;; if y-factor > 0 then image height is scaled to that height (if x-factor==0 then keep aspect ratio)
;; if y-factor < 0 then image height is scaled by magnitude of that amount (x-factor==0 means flip vertically)
;; if x-factor AND y-factor = 0 then rotate image 90 deg CCW
(define (batch-scale-image pattern x-factor y-factor suffix)
(let* (
(filelist (cadr (file-glob pattern 1)))