Skip to content

Instantly share code, notes, and snippets.

@opie4624
opie4624 / tarsnap-install.sh
Last active December 11, 2015 00:17 — forked from mdigital/tarsnap-install.sh
Debian / Ubuntu Tarsnap installation
#!/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
#
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]
Verifying myself: My Bitcoin username is +akraut. https://onename.io/akraut

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 December 30, 2012 01:12
Calculate git-annex cost based on ping times for remote hosts.
#!/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 February 7, 2024 01:39
Base Python Command Line template
#!/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)
#!/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
#!/bin/bash
while getopts "vdn:b:" opt; do
case $opt in
h)
echo "usage: $0 [-h] [-v] [-d] [-n skip] [-b parallel]"
exit
;;
v)
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
DATESTAMP_ES %{YEAR}-%{MONTHNUM}-%{MONTHDAY} %{HOUR}:%{MINUTE}:%{SECOND},%{NUMBER}
ELASTICSEARCHLOG \[%{DATESTAMP_ES:timestamp}\]\[%{WORD:level}\]\[%{DATA:module}%{SPACE}\] \[%{WORD:name}\]%{SPACE}%{GREEDYDATA:message}