The figure below calls out
- The netfilter hooks
- The order of table traversal
# Check services every 5mins | |
set daemon 300 | |
# logfile location | |
set logfile /var/log/monit.log | |
# Email notifications | |
#set mailserver localhost # A local mailserver may be down, better to use gmail | |
set mailserver smtp.gmail.com port 587 | |
username "googleuser@gmail.com" password "googlepass" |
LOCK TABLES `table_name` WRITE; | |
SET autocommit=0; | |
SET foreign_key_checks=0; | |
SET unique_checks=0; | |
/*.... | |
INSERT ... ON DUPLICATE KEY UPDATE | |
INSERT IGNORE INTO | |
....*/ |
#!/bin/bash | |
## Copyright (C) 2009 Przemyslaw Pawelczyk <przemoc@gmail.com> | |
## | |
## This script is licensed under the terms of the MIT license. | |
## https://opensource.org/licenses/MIT | |
# | |
# Lockable script boilerplate | |
### HEADER ### |
#define KBUILD_MODNAME "load_balancer" | |
#include <uapi/linux/bpf.h> | |
#include <linux/in.h> | |
#include <linux/if_ether.h> | |
#include <linux/if_packet.h> | |
#include <linux/if_vlan.h> | |
#include <linux/ip.h> | |
#include <linux/ipv6.h> | |
BPF_HASH(counter, uint32_t, long); |
# Tested on Centos 6.9 and Centos 7.4. ClickHouse vesion 1.1.54236 | |
# Official build instructions: | |
# https://github.com/yandex/ClickHouse/blob/master/doc/build.md | |
# See also https://github.com/redsoftbiz/clickhouse-rpm | |
# and https://github.com/Altinity/clickhouse-rpm | |
export THREADS=$(grep -c ^processor /proc/cpuinfo) | |
# Determine RHEL major version | |
RHEL_VERSION=`rpm -qa --queryformat '%{VERSION}\n' '(redhat|sl|slf|centos|oraclelinux|goslinux)-release(|-server|-workstation|-client|-computenode)'` |
// Playbook: http://play.golang.org/p/kp5uL_mMGk | |
// Note: Type assertion like "someVariable.(string)" is useful when you are dealing with interface{} (empty interface) | |
package main | |
import ( | |
"fmt" | |
"strconv" | |
) |
cni-bash-plugin | |
files: | |
/etc/rkt/net.d/bridge.sh.conf | |
/etc/rkt/net.d/bridge-dhcp.sh | |
/etc/rkt/net.d/bridge.sh | |
usage: | |
rkt run \ | |
--insecure-options=all \ |
// run | |
// Copyright 2009 The Go Authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style | |
// license that can be found in the LICENSE file. | |
// Test concurrency primitives: power series. | |
// Power series package | |
// A power series is a channel, along which flow rational |
{{- range services -}} | |
{{- if .Name | contains "sidecar" | not -}} | |
{{- $groupedServices := (service .Name | byMeta "caddy_enable") -}} | |
{{- $enabledServices := (index $groupedServices "true" ) -}} | |
{{- range $enabledServices -}} | |
{{- $vhost := index .ServiceMeta "caddy_vhost" -}} | |
{{- scratch.MapSetX "vhosts" $vhost . -}} | |
{{- end -}} | |
{{- end -}} | |
{{- end -}} |