Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
"""check Misty version numbers against reference
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@slivingston
slivingston / nginx.conf
Created December 7, 2018 05:38
PoC of Misty API Explorer reverse proxy auth via URL injection
# Copyright (C) 2018 rerobots, Inc.
# by SCL <scott@rerobots.net>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@slivingston
slivingston / cds110-tutorial.py
Last active August 29, 2015 14:13
Created for the CDS 110 course at Caltech but which others may find useful.
#!/usr/bin/env python
#
# Copyright (c) 2012, 2015 by California Institute of Technology
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
@slivingston
slivingston / post-receive-email
Last active October 13, 2015 12:57
patched Git hook, based on Andy Parkins's post-receive-email
#!/bin/sh
#
# 26 Nov 2012: Modified by Scott C. Livingston <slivingston@cds.caltech.edu>
# to ignore commits to branches besides master. Tags are not
# affected by this change.
#
# 3 Dec 2012: Modified by SCL <slivingston@cds.caltech.edu> to optionally
# use the output of a shell command in the subject line. The
# command is determined by the config hooks.subjectcmd in a manner
# similar that used by hooks.showrev (see below) and inserted
@slivingston
slivingston / gist:2774377
Created May 23, 2012 10:05
LaTeX code to generate timestamp; the resulting command is \now
%% Code to create a timestamp. The resulting command is \now
%%
%% SCL; 30 May 2012
\newcount\hour \newcount\minute
\hour=\time \divide \hour by 60
\minute=\time
\loop \ifnum \minute > 59 \advance \minute by -60 \repeat
\def\now{\number\year%
-{\ifnum \month < 10 0\fi}\number\month%
-{\ifnum \day < 10 0\fi}\number\day%