Skip to content

Instantly share code, notes, and snippets.

View inferiorhumanorgans's full-sized avatar

inferiorhumanorgans

  • San Francisco, CA
View GitHub Profile
;; 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)))
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."""
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());
# $FreeBSD$
LIB= pam_exec
SRCS= pam_exec.c
SHLIB_MAJOR= 5
WARNS?= 1
.include <bsd.lib.mk>
#!/usr/sbin/dtrace -s
#pragma D option quiet
io:::start
{
self->ok = 0;
/* https://lists.freebsd.org/pipermail/freebsd-dtrace/2015-February/000347.html */
self->ok = (args[0] != NULL) ? 1 : 0;
$ make
gcc -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.5 -headerpad_max_install_names -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -I. -I. -I/Library/PostgreSQL/9.2/include/postgresql/server -I/Library/PostgreSQL/9.2/include/postgresql/internal -I/usr/local/include/libxml2 -I/usr/local/include/libxml2 -I/usr/local/include -c -o ip4r_module.o ip4r_module.c
clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk'
clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk'
clang: warning: argument unused during compilation: '-headerpad_max_install_names'
In file included from ip4r_module.c:3:
./ipr.h:3:10: fatal err
#!/usr/bin/env ruby
require 'json'
require 'net/http'
require 'optparse'
require 'ostruct'
CHANNEL_URL = 'http://web.mobilerider.com/clients/hsb/api/media/?filter={"channel":{},"query":""}'
STREAMS = {}
@inferiorhumanorgans
inferiorhumanorgans / bootstrap_svg_fix.diff
Created June 7, 2012 04:42
Fix popover positioning on SVG elements
diff --git a/vendor/assets/javascripts/twitter/bootstrap.js b/vendor/assets/javascripts/twitter/bootstrap.js
index 6479673..9497ed4 100644
--- a/vendor/assets/javascripts/twitter/bootstrap.js
+++ b/vendor/assets/javascripts/twitter/bootstrap.js
@@ -961,6 +961,14 @@
actualWidth = $tip[0].offsetWidth
actualHeight = $tip[0].offsetHeight
+ if ((typeof(pos.height) == 'undefined') || (pos.height == 0)) {
+ pos.height = this.$element.attr('height')
From 57ec3068f381223fdae2aedb40c0aaecd4a01bf4 Mon Sep 17 00:00:00 2001
From: Alex Zepeda <alex@inferiorhumanorgans.com>
Date: Thu, 8 Mar 2012 11:57:47 -0800
Subject: [PATCH] verify-tag: Parse GPG configuration options.
Modify verify-tag to load relevant GPG variables from the git
configuratio file. This allows git tag -v to use an alternative
GPG binary in the same way that git tag -s does.
Signed-off-by: Alex Zepeda <alex@inferiorhumanorgans.com>
@inferiorhumanorgans
inferiorhumanorgans / main.tf
Created May 28, 2015 23:18
Terraform discreet state files w/ interpolation
variable "unique" {}
variable "cidr" {}
provider "aws" {
region="us-east-1"
secret_key=""
access_key=""
}
resource "aws_security_group" "default" {