Skip to content

Instantly share code, notes, and snippets.

Andrew Kraut opie4624

Block or report user

Report or block opie4624

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@opie4624
opie4624 / tarsnap-install.sh
Last active Dec 11, 2015 — forked from mdigital/tarsnap-install.sh
Debian / Ubuntu Tarsnap installation
View tarsnap-install.sh
#!/bin/sh
# Installs tarsnap client on Debian and Ubuntu
#
# You'll need to setup an account at
# http://www.tarsnap.com
# and load it with some funds
#
# Make sure you run this as root
#
View pseopidargs.txt
PID COMMAND
1 /sbin/init
2 [kthreadd]
3 [ksoftirqd/0]
6 [migration/0]
7 [watchdog/0]
8 [migration/1]
10 [ksoftirqd/1]
12 [watchdog/1]
13 [migration/2]
View gist:c506c4c3da6212464a75
Verifying myself: My Bitcoin username is +akraut. https://onename.io/akraut
View keybase.md

Keybase proof

I hereby claim:

  • I am opie4624 on github.
  • I am akraut (https://keybase.io/akraut) on keybase.
  • I have a public key whose fingerprint is 6D39 AD49 ECA5 93C2 2930 C1C4 B608 B8F6 E905 3BDA

To claim this, I am signing this object:

@opie4624
opie4624 / annex-cost.sh
Created Dec 30, 2012
Calculate git-annex cost based on ping times for remote hosts.
View annex-cost.sh
#!/bin/sh
#
PING="/sbin/ping"
PACKET_SIZE=64
PACKET_COUNT=10
PING_INTERVAL=1
TIMEOUT=2
BASE_COST=200
@opie4624
opie4624 / commandline.py
Last active Jun 13, 2019
Base Python Command Line template
View commandline.py
#!/usr/bin/env python
#
# import modules used here -- sys is a very standard one
import sys, argparse, logging
# Gather our code in a main() function
def main(args, loglevel):
logging.basicConfig(format="%(levelname)s: %(message)s", level=loglevel)
View netlog.sh
#!/bin/bash
LOG=/tmp/netlog-$1
rm -f $LOG
while ( true );
do
ping -c1 -t 1 $1 > /dev/null
if [ "$?" -gt "0" ]; then
echo `date` " I am offline" | tee $LOG
traceroute -a $1 | tee $LOG
fi
View remote_rotate.sh
#!/bin/bash
while getopts "vdn:b:" opt; do
case $opt in
h)
echo "usage: $0 [-h] [-v] [-d] [-n skip] [-b parallel]"
exit
;;
v)
View gist:2721659
14:22:20 <jk0> damacus: if you need something to read, check out 'Many Lives, Many Masters'. awesome book
14:22:30 <jk0> I read it in 2-3 hours one day when I was supposed to be working
14:22:32 <jk0> couldn't put it down
14:22:38 <psych0sys> also Many Masters, Few Baiters by the same author
14:22:41 <psych0sys> its a graphic novel
View elasticsearch
DATESTAMP_ES %{YEAR}-%{MONTHNUM}-%{MONTHDAY} %{HOUR}:%{MINUTE}:%{SECOND},%{NUMBER}
ELASTICSEARCHLOG \[%{DATESTAMP_ES:timestamp}\]\[%{WORD:level}\]\[%{DATA:module}%{SPACE}\] \[%{WORD:name}\]%{SPACE}%{GREEDYDATA:message}
You can’t perform that action at this time.