For excessively paranoid client authentication.
Updated Apr 5 2019:
because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.
some other notes:
| #!/bin/sh | |
| # -*- sh -*- | |
| # NOTE: This is the bare min needed to make an ec2 image from a stage3 gentoo image. | |
| # !st Build a stage3 from somewhere. I use metro. ...then... -> | |
| # | |
| # Configure | |
| # |
| #!/bin/bash | |
| # | |
| # Prints out how many seconds ago this EC2 instance was started | |
| # | |
| # It uses Last-Modified header returned by EC2 metadata web service, which as far | |
| # as I know is not documented, and hence I assume there is no guarantee | |
| # that Last-Modified will be always set correctly. | |
| # | |
| # Use at your own risk. | |
| # |
| import random | |
| class Markov(object): | |
| def __init__(self, open_file): | |
| self.cache = {} | |
| self.open_file = open_file | |
| self.words = self.file_to_words() | |
| self.word_size = len(self.words) | |
| self.database() |
| package Profiler::Decorator; | |
| use IO::Socket::INET; | |
| use Time::HiRes qw( usleep ualarm gettimeofday tv_interval nanosleep clock_gettime clock_getres clock_nanosleep clock stat ); | |
| use Data::Dumper; | |
| # flush after every write | |
| # We call IO::Socket::INET->new() to create the UDP Socket | |
| # and bind with the PeerAddr. |
| This playbook has been removed as it is now very outdated. |
| #!/bin/bash | |
| # bash generate random alphanumeric string | |
| # | |
| # bash generate random 32 character alphanumeric string (upper and lowercase) and | |
| NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
| # bash generate random 32 character alphanumeric string (lowercase only) | |
| cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1 |
| Use folowing steps to repackage dep package: | |
| 1: Extract deb package | |
| # dpkg-deb -x <package.deb> <dir> | |
| 2: Extract control-information from a package | |
| # dpkg-deb -e <package.deb> <dir/DEBIAN> | |
| 3. After completed to make changes to the package, repack the deb | |
| # dpkg-deb -b <dir> <new-package.deb> |
| #!/usr/local/bin/zsh | |
| version="3.4.4" | |
| priority="30404" | |
| sudo mkdir -p /var/log/zookeeper /usr/local/zookeeper /var/zookeeper | |
| curl -L http://ftp.kddilabs.jp/infosystems/apache/zookeeper/zookeeper-${version}/zookeeper-${version}.tar.gz | tar zx | |
| sudo cp -r zookeeper-${version} /usr/local/zookeeper/${version} | |
| sudo cp ./zookeeper.sh /usr/local/zookeeper/ | |
| sudo cp ./zoo.cfg /etc/ |
| import javax.net.ssl.SSLParameters; | |
| import javax.net.ssl.SSLSocket; | |
| import javax.net.ssl.SSLSocketFactory; | |
| import java.io.*; | |
| /** Establish a SSL connection to a host and port, writes a byte and | |
| * prints the response. See | |
| * http://confluence.atlassian.com/display/JIRA/Connecting+to+SSL+services | |
| */ | |
| public class SSLPoke { |