I hereby claim:
- I am ab on github.
- I am agb (https://keybase.io/agb) on keybase.
- I have a public key whose fingerprint is 67B4 E575 99FC 7217 0C8C FAEE C709 0B1A 5F57 CDC5
To claim this, I am signing this object:
description "autossh tunnel to HOST" | |
author "Andy Brody" | |
start on (local-filesystems and net-device-up IFACE=eth0) | |
stop on runlevel [016] | |
respawn | |
respawn limit unlimited | |
setuid tunnel |
#!/bin/sh | |
# 1.0 | |
set -eu | |
HOSTS=/etc/hosts | |
usage() { | |
cat <<EOM | |
usage: $(basename "$0") OPTION... | |
Modify /etc/hosts by adding or removing comments from lines by IP address. |
#!/bin/bash | |
set -e | |
false() { | |
echo 'this is false' | |
command false | |
} | |
echo 'starting' |
#!/usr/bin/env ruby | |
require 'socket' | |
require 'openssl' | |
def check_ssl_cert(host, port, ca_file) | |
sock = TCPSocket.new(host, port) | |
ctx = OpenSSL::SSL::SSLContext.new | |
ctx.set_params(:verify_mode => OpenSSL::SSL::VERIFY_PEER, | |
:ca_file => ca_file) |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env ruby | |
require 'openssl' | |
require 'optparse' | |
require 'set' | |
class CaBundle | |
class ParseError < StandardError; end | |
DefaultCAFile = '/etc/ssl/certs/ca-certificates.crt' | |
VERSION = '0.2.1' |
#!/bin/sh | |
set -eux | |
first_next_month="$(date -d "+1 month - $(date +%d) days + 1 day" +%A)" | |
/usr/sbin/sendmail -t <<END | |
From: Me <[email protected]> | |
To: Alice <[email protected]>, Bob <[email protected]> | |
Bcc: Me <[email protected]> | |
Subject: Reminder: rent is due $first_next_month EOM |
# This configuration file governs how OpenSSL should operate for this CA. | |
[ ca ] | |
default_ca = CA_myca | |
[ CA_myca ] | |
dir = ./ca | |
certs = $dir/certs | |
crl_dir = $dir/crl | |
database = $dir/index.txt |
# must be absolute path | |
CATOP = $(PWD)/ca | |
# see https://gist.github.com/4570053 for sample ca.conf | |
CACONF = $(CATOP)/../ca.conf | |
OPENSSL = openssl | |
DAYS = -days 3652 | |
CADAYS = -days 3652 | |
REQ = $(OPENSSL) req -config $(CACONF) | |
CA = $(OPENSSL) ca -config $(CACONF) |
$ sudo kpartx -v -a stripe-ctf-server-ubuntu-10.04-lucid-amd64-20120427-0108.img | |
add map loop0p1 (253:7): 0 8386560 linear /dev/loop0 2048 | |
$ mkdir /tmp/mnt | |
$ sudo mount /dev/mapper/loop0p1 /tmp/mnt | |
$ sudo chroot /tmp/mnt | |
# getent passwd | |
root:x:0:0:root:/root:/bin/bash | |
daemon:x:1:1:daemon:/usr/sbin:/bin/sh | |
bin:x:2:2:bin:/bin:/bin/sh | |
sys:x:3:3:sys:/dev:/bin/sh |