I hereby claim:
- I am mikedacre on github.
- I am mike_dacre (https://keybase.io/mike_dacre) on keybase.
- I have a public key ASD_6hbCTlnvDAXei37EX6ct2rknqNWR-QKRzTSVhj7MNwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
The point is to renew the core signing key, encryption key, and authentication key, and to create a set of subkeys to be used on devices without access to the GPG card.
The encryption key should not 'expire' ever, as it is needed for communication, the same is true for the parent key, which should never be anywhere other than the card and the veracrypt container. We give them an expiration date anyway, so that if something happens and I can't renew them, they eventually become invalud.
# Based on https://support.cloudflare.com/hc/en-us/articles/200170706-How-do-I-restore-original-visitor-IP-with-Nginx- | |
# Save this file to /usr/bin/clodflare_refresh_nginx.sh | |
# Add the line "include /etc/nginx/global/cloudflare-ip.conf" to the server | |
# block of every nginx site you wish to expose the real IP for | |
# Add crontab (run a 03:05 every day): 5 3 * * * /usr/bin/clodflare_refresh_nginx.sh >/dev/null 2>&1 | |
NGINX_CONF=/etc/nginx/global/cloudflare-ip.conf | |
curl https://www.cloudflare.com/ips-v4 | perl -p -e 's/^(.*)$/set_real_ip_from \1;/g' > $NGINX_CONF | |
curl https://www.cloudflare.com/ips-v6 | perl -p -e 's/^(.*)$/set_real_ip_from \1;/g' >> $NGINX_CONF | |
# use any of the following two | |
echo "real_ip_header CF-Connecting-IP;" >> $NGINX_CONF |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Rewrite of the shell script for easy running from anywhere with cluster support. | |
Place this in the root of pascal and link to it from your path | |
""" | |
from __future__ import print_function | |
import os as _os | |
import sys as _sys |
def run_filter(df, group_cols: list, merge_col: str, sort_col: str, cutoff: float = 0.6): | |
"""Make a DataFrame unique on group_cols based on boolean merge_col and float sort_col. | |
Picks most frequent result of boolean merge_col if the result represents a portion of the | |
total greater than cutoff. Then sorts the results ascending by sort_col and returns the | |
first row only. | |
If filter fails (i.e. top hit is less than cutoff of total) then the entire group is dropped. | |
Parameters |
$PATH: | |
/usr/local/anaconda3/bin | |
/usr/local/anaconda3/bin | |
/home/dacre/bin | |
/usr/local/sbin | |
/usr/local/bin | |
/usr/bin | |
/home/dacre/usr/bin | |
/usr/local/MATLAB/R2013a/bin | |
/usr/lib/jvm/default/bin |
+ [pyenv:24] enable -f /home/dacre/.pyenv/libexec/../libexec/pyenv-realpath.dylib realpath | |
+ [pyenv:30] '[' -z '' ']' | |
++ [pyenv:32] type -p greadlink readlink | |
++ [pyenv:32] head -1 | |
+ [pyenv:32] READLINK=/usr/bin/readlink | |
+ [pyenv:33] '[' -n /usr/bin/readlink ']' | |
+ [pyenv:54] '[' -z /home/dacre/.pyenv ']' | |
+ [pyenv:57] PYENV_ROOT=/home/dacre/.pyenv | |
+ [pyenv:59] export PYENV_ROOT | |
+ [pyenv:62] '[' -z '' ']' |
" Settings | |
" set nohud | |
" set nosmoothscroll | |
" set noautofocus " The opposite of autofocus; this setting stops | |
" sites from focusing on an input box when they load | |
set typelinkhints | |
let searchlimit = 30 | |
let scrollstep = 70 | |
let barposition = "bottom" |