Skip to content

Instantly share code, notes, and snippets.

View franzinc's full-sized avatar

franzinc franzinc

View GitHub Profile
(in-package :net.aserve)
;; Speedy to cache this.
(defparameter *ws-saved-ut-to-date* nil)
;; Generate the date for apache-style logs from a time and timezone.
(defun ws-universal-time-to-date (ut &optional (time-zone 8))
(when (stringp ut) (return-from ws-universal-time-to-date ut))
(let ((cval *ws-saved-ut-to-date*))
(if* (and (eql ut (caar cval))
@franzinc
franzinc / aws-get-current-charges.sh
Created September 9, 2020 20:56
Print an estimate of your current AWS bill, with the incremental change in the last 24 hours
#! /usr/bin/env bash
# Print the current bill for each AWS account, with a total at the end
# for all accounts.
# ideas from and thanks to:
# https://medium.com/synaptic-tech/daily-aws-billing-alert-4ea541475ff8
set -eu
# Change "..." to contain the profile names of your AWS accounts.
identities="..."
@franzinc
franzinc / gist:82a3c1d8b15964f010bbe046a3048351
Created November 21, 2019 00:09
spr44774: Linux install of acl10.1express on Linux Mint
$ docker run -it -e DISPLAY -v $(dirname $XAUTHORITY)/:$(dirname $XAUTHORITY)/ -v ${lisp}:/lisp $container
# dpkg --add-architecture i386
dpkg --add-architecture i386
# apt-get update && apt-get -y upgrade
apt-get update && apt-get -y upgrade
Ign:1 http://packages.linuxmint.com tessa InRelease
Get:2 http://archive.canonical.com/ubuntu bionic InRelease [10.2 kB]
Get:3 http://packages.linuxmint.com tessa Release [24.1 kB]
Hit:4 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:5 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
@franzinc
franzinc / checkec2.cl
Created April 15, 2015 21:19
My script to alert me to Amazon AWS usage via email
#! /fi/cl/9.0/bin/linuxamd64.64/mlisp -#D
(in-package :user)
(defparameter *instance-exceptions*
;; these instances are known to be running and are exceptions:
...)
(defparameter *volume-exceptions*
;; these instances are known to be running and are exceptions: