SMTP test driver using JavaMail version 1.5.2.
# SSL/TLS port: 465
# Otherwise: 587
smtp.host=smtp.mail.yahoo.com
smtp.port=465
smtp.useSsl=true
from __future__ import with_statement # we'll use this later, has to be here | |
from argparse import ArgumentParser | |
import requests | |
from BeautifulSoup import BeautifulStoneSoup as Soup | |
def parse_sitemap(url): | |
resp = requests.get(url) | |
# we didn't get a valid response, bail |
<?php | |
/* | |
* Plugin Name: Better errors | |
* Description: Better errors in log | |
* Author: Daniele Scasciafratte | |
* Version: 1.0 | |
* Author URI: http://codeat.co | |
*/ | |
function handleError($code, $description, $file = null, $line = null, $context = null) { |
# INSTALL BASH_COMPLETION PACKAGE FIRST!!! | |
# yum install bash-completion | |
#!bash | |
# | |
# bash completion file for core docker commands | |
# |
#! /usr/bin/env python | |
import fileinput | |
import argparse | |
from operator import itemgetter | |
parser = argparse.ArgumentParser() | |
parser.add_argument('--target-mb', action = 'store', dest = 'target_mb', default = 61000, type = int) | |
parser.add_argument('vmtouch_output_file', action = 'store', nargs = '+') | |
args = parser.parse_args() |
# ######################################## | |
# Start server and manager in background | |
/start-server.sh & | |
SERVER_PID=$! | |
/start-manager.sh & | |
MANAGER_PID=$! | |
# ######################################## |
# No dupes | |
export HISTCONTROL=ignoreboth:erasedups | |
# Eternal bash history. | |
# --------------------- | |
# Undocumented feature which sets the size to "unlimited". | |
# http://stackoverflow.com/questions/9457233/unlimited-bash-history | |
export HISTFILESIZE= | |
export HISTSIZE= | |
export HISTTIMEFORMAT="%F %T " |
# Syslog stuff | |
COMPONENT ([\w._\/%-]+) | |
COMPID postfix\/%{COMPONENT:component}(?:\[%{POSINT:pid}\])? | |
POSTFIX %{SYSLOGTIMESTAMP:timestamp} %{SYSLOGHOST:hostname} %{COMPID}: %{QUEUEID:queueid} | |
# Milter | |
HELO (?:\[%{IP:helo}\]|%{HOST:helo}|%{DATA:helo}) | |
MILTERCONNECT %{QUEUEID:qid}: milter-reject: CONNECT from %{RELAY:relay}: %{GREEDYDATA:milter_reason}; proto=%{WORD:proto} | |
MILTERUNKNOWN %{QUEUEID:qid}: milter-reject: UNKNOWN from %{RELAY:relay}: %{GREEDYDATA:milter_reason}; proto=%{WORD:proto} |
# Python regular expressions for IPv4 and IPv6 addresses and URI-references, | |
# based on RFC 3986's ABNF. | |
# | |
# ipv4_address and ipv6_address are self-explanatory. | |
# ipv6_addrz requires a zone ID (RFC 6874) follow the IPv6 address. | |
# ipv6_address_or_addrz allows an IPv6 address with optional zone ID. | |
# uri_reference is what you think of as a URI. (It uses ipv6_address_or_addrz.) | |
import re |
DATA AND METADATA COHERENCE | |
Some modern cluster file systems provide perfect cache coherence among their clients. Perfect cache coherence among disparate NFS clients is expensive to achieve, especially on wide area networks. As such, NFS settles for weaker cache coherence that satisfies the requirements of most file sharing types. | |
Close-to-open cache consistency | |
Typically file sharing is completely sequential. First client A opens a file, writes something to it, then closes it. Then client B opens the same file, and reads the changes. | |
When an application opens a file stored on an NFS version 3 server, the NFS client checks that the file exists on the server and is permitted to the opener by sending a GETATTR or ACCESS request. The NFS client sends these requests regardless of the freshness of the file's cached attributes. | |
When the application closes the file, the NFS client writes back any pending changes to the file so that the next opener can view the changes. This al |