This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Iterator; | |
import java.util.Map; | |
import java.util.TreeMap; | |
import javax.net.ssl.SSLServerSocketFactory; | |
/* | |
* Source from Christopher Schultz | |
* @see http://markmail.org/message/zn4namfhypyxum23 | |
*/ | |
public class SSLInfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Emulating wide area network delays | |
This is the simplest example, it just adds a fixed amount of delay to all packets going out of the local Ethernet. | |
# tc qdisc add dev eth0 root netem delay 100ms | |
Now a simple ping test to host on the local network should show an increase of 100 milliseconds. The delay is limited by the clock resolution of the kernel (Hz). On most 2.4 systems, the system clock runs at 100 Hz which allows delays in increments of 10 ms. On 2.6, the value is a configuration parameter from 1000 to 100 Hz. | |
Later examples just change parameters without reloading the qdisc | |
Real wide area networks show variability so it is possible to add random variation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
/** | |
* A demo Java application to see how GC works. | |
* | |
* @author Thanh Nguyen | |
*/ | |
public class GcMemDemo { | |
static Map<Long, byte[]> buffer = new HashMap<>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# debug: print all vars and function | |
env | |
set | |
# debug: print all commands during execution | |
set -x | |
TUNNEL_NAME="${PLUTO_CONNECTION}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# names of latest versions of each package | |
export NGINX_VERSION=1.15.5 | |
export VERSION_NGINX=nginx-$NGINX_VERSION | |
export VERSION_LIBRESSL=libressl-2.8.1 | |
export VERSION_PCRE=pcre-8.42 | |
#export NPS_VERSION=1.9.32.10 | |
#export VERSION_PAGESPEED=v${NPS_VERSION}-beta | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example YAML configuration for the adapter pattern. | |
# It defines a main application container which writes | |
# the current date and system usage information to a log file | |
# every five seconds. | |
# The adapter container reads what the application has written and | |
# reformats it into a structure that a hypothetical monitoring | |
# service requires. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-Xlog Usage: -Xlog[:[selections][:[output][:[decorators][:output-options]]]] | |
where 'selections' are combinations of tags and levels of the form tag1[+tag2...][*][=level][,...] | |
NOTE: Unless wildcard (*) is specified, only log messages tagged with exactly the tags specified will be matched. | |
Available log levels: | |
off, trace, debug, info, warning, error | |
Available log decorators: | |
time (t), utctime (utc), uptime (u), timemillis (tm), uptimemillis (um), timenanos (tn), uptimenanos (un), hostname (hn), pid (p), tid (ti), level (l), tags (tg) | |
Decorators can also be specified as 'none' for no decoration. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Names of latest versions of each package | |
export VERSION_PCRE=pcre-8.39 | |
export VERSION_ZLIB=zlib-1.2.8 | |
export VERSION_LIBRESSL=libressl-2.4.2 | |
export VERSION_NGINX=nginx-1.11.3 | |
# URLs to the source directories | |
export SOURCE_LIBRESSL=http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Restrictive Iptables Based Firewall for Webserver script | |
# Copyright (C) 2012 Cédric Walter - www.waltercedric.com | |
# Credits to all various authors | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##################### ElasticSearch Configuration Example ##################### | |
# This file contains an overview of various configuration settings, | |
# targeted at operations staff. Application developers should | |
# consult the guide at <http://elasticsearch.org/guide>. | |
# | |
# The installation procedure is covered at | |
# <http://elasticsearch.org/guide/en/elasticsearch/reference/current/setup.html>. | |
# | |
# ElasticSearch comes with reasonable defaults for most settings, |
OlderNewer