I hereby claim:
- I am frick on github.
- I am mdfrick (https://keybase.io/mdfrick) on keybase.
- I have a public key ASBnGcBSPaed__zc5v_ojFlruHUR53xyZcx-Jff-P-02pwo
To claim this, I am signing this object:
#!/bin/bash | |
DATE_FORMAT="%F %T %Z" | |
SEL=$(xclip -o | sed 's/[^0-9A-Fa-f]//g') | |
notify () { | |
# hack to allow more than one alert to be sent every 6 seconds | |
pkill -9 -f "notify-osd" | |
notify-send -i appointment-new "$1" | |
} |
function openfiles { | |
if [ "${1}" = "-h" ]; then | |
echo -e "Usage: openfiles [r|w|m|R|W] regex\n -r opened for reading or read/write\n -w opened for writing or read/write\n -m accessed from memory (includes running command)\n -R opened for reading only\n -W opened for writing only" | |
return | |
fi | |
if [ "$#" = "0" ]; then | |
echo "Process signature/regex required." | |
return | |
fi | |
MODE="(w|u)" |
function listening { | |
if [ "${1}" = "-h" ]; then | |
echo "Usage: listening [t|tcp|u|udp] [ps regex]" | |
return | |
fi | |
DISP="both" | |
NSOPTS="tu" | |
if [ "${1}" = "t" -o "${1}" = "tcp" ]; then | |
DISP="tcp" | |
NSOPTS="t" |
function fixssh { | |
local hostname="" | |
local ip="" | |
for arg in $@; do | |
local hostout=$(host "$arg" 2>/dev/null) | |
if [ $? -eq 0 ]; then | |
local out=$(echo "$hostout" | grep -o "has address .*$" | grep -Eo "[0-9.]{7,15}") | |
if [ $? -eq 0 ]; then | |
local hostname="$arg" | |
local ip="$out" |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python3 | |
""" | |
Minimally parse logs in order to merge their contents in sorted order with minimal | |
resource usage - primarily memory, in order to support very large log files. For | |
example, whether 10 MBs or 10 GBs of logs, <15 MBs of memory is typically allocated. | |
Assumes each individual log file is already sorted. | |
The bash 'globstar' option is recommended in order to easily pass all log paths like: | |
./logsort.py mongodb-*/**/*.log | |
To enable: |