Skip to content

Instantly share code, notes, and snippets.

@hcoyote
hcoyote / gist:1fb3e0fe28cca93bf363a8bfe3aa2f0f
Created March 17, 2020 17:50
Variance swap delta hedging using only words found in Dr Seuss from ScottJo34110219
https://threadreaderapp.com/thread/1238864479888248832.html (tweets now deleted or author disabled account/made private)
Scott
@ScottJo34110219
2 hours ago, 33 tweets, 5 min read
 My Authors
Ok here we go, as promised. Variance swap delta hedging using only words found in Dr Seuss. 1/n 
Here's the Bossu paper again for those who do words & numbers together. Thanks again to @nextSignals: docs.sbossu.com/bossu-strasser… 2/n 

Keybase proof

I hereby claim:

  • I am hcoyote on github.
  • I am hcoyote (https://keybase.io/hcoyote) on keybase.
  • I have a public key whose fingerprint is 315E 6BBC 3014 2779 3E80 FCA9 1B0A 400E E867 44EB

To claim this, I am signing this object:

@hcoyote
hcoyote / gist:49a12f092fad2b308d13
Created March 4, 2015 01:02
sync_kerberos_data for MIT KRB
#!/bin/bash
backup=0
kdc_secondaries=(kdc1.example.net kdc2.example.net kdc3.example.net)
default_location=/var/kerberos/krb5kdc/slave_datatrans
default_backup=/var/kerberos/krb5kdc_backup
location=$default_location
datestamp=$(date +%Y-%m-%d.%H%M%S)
verbose=0
@hcoyote
hcoyote / gist:5950262
Created July 8, 2013 16:21
I got your rot13() right here ...
rot13 ()
{
if [ $# = 0 ]; then
tr "[a-m][n-z][A-M][N-Z]" "[n-z][a-m][N-Z][A-M]";
else
tr "[a-m][n-z][A-M][N-Z]" "[n-z][a-m][N-Z][A-M]" < $1;
fi
}
@hcoyote
hcoyote / ops::mysql_scripts
Created September 19, 2012 16:02
example usage of ops::install_file
# this calls ops::install_file to install each file in our directory defined in
# ops::install_file ... in our case, /usr/local/ops/bin by default.
class ops::mysql_scripts {
ops::install_file{[
"mye",
"mysql-init",
"mysql-vars",
]:}
@hcoyote
hcoyote / ops::install_file.pp
Created September 19, 2012 15:59
general puppet define to install a templated file somewhere.
# this define allows us to inject a file into the catalog so it
# transfers over to the client in one big blog, instead of the client having to
# hit up the puppet file server for each file (meaning, 1 additional HTTP request
# per file)
define ops::install_file(
$ensure = present,
$filetype = "bin",
$module = $module_name,
$filename = $name,
@hcoyote
hcoyote / check_zookeeper.sh
Created February 22, 2012 17:35
Get a healthcheck on zookeeper. must be a version that responds to ruok.
#!/bin/sh
HOST=$1
PORT=$2
TIMEOUT=5
if [ ! -x /usr/bin/nc ] ; then
echo "/usr/bin/nc is missing; required for $0 to run"
exit 3
@hcoyote
hcoyote / check_hadoop_dfs_report.pl
Created February 22, 2012 17:33
parse the dfsadmin report and give us some info about the cluster; warn if things are missing, if we have dead nodes, if we don't have enough datanodes, corrupt blocks, etc.
#!/usr/bin/perl
#
# This script is managed by puppet.
#
use strict;
use warnings;
use IO::File;
use Getopt::Long;
@hcoyote
hcoyote / check_hadoop_safemode.pl
Created February 22, 2012 17:29
Determine if our HDFS is in safemode for some reason.
#!/usr/bin/perl
#
# This script is managed by puppet.
#
use strict;
use warnings;
use File::stat;
use Getopt::Long;
@hcoyote
hcoyote / check_hdfs.sh
Created February 22, 2012 17:28
Run hadoop fsck and determine if our HDFS is corrupt in some way. This is very basic and could be extended further to tell you what the corruption really is.
#!/bin/sh
if [ -x /usr/bin/hadoop ] ; then
chk_hdfs=`/usr/bin/hadoop fsck / | grep 'filesystem under path'`
case $chk_hdfs in
*HEALTHY*)
echo "OK - HDFS is healthy"
exit 0
;;