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
kprobe:fib_validate_source { | |
$skb = (struct sk_buff*) arg0; | |
@skb[tid] = $skb; | |
@ipheader[tid] = ((struct iphdr *) ($skb->head + $skb->network_header)); | |
} | |
kretprobe:fib_validate_source { | |
$skb = @skb[tid]; | |
$ipheader = @ipheader[tid]; | |
$version = $ipheader->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
-- Description: | |
-- ------------ | |
-- | |
-- This is an example schema for storing collectd metrics in a TimescaleDB | |
-- dabase (see https://www.timescale.com/). It is based on the PostgreSQL | |
-- schema contributed by Sebastian Harl. | |
-- | |
-- Prerequisities: | |
-- --------------- | |
-- |
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
# Generate a random password | |
# Usage: random-password <length> | |
Function random-password ($length = 15) | |
{ | |
$punc = 46..46 | |
$digits = 48..57 | |
$letters = 65..90 + 97..122 | |
# Thanks to | |
# https://blogs.technet.com/b/heyscriptingguy/archive/2012/01/07/use-pow |
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
# Wait for a DHCP-enabled interface to develop | |
# a default gateway. | |
# | |
# usage: wait-for-network [ <tries> ] | |
function wait-for-network ($tries) { | |
while (1) { | |
# Get a list of DHCP-enabled interfaces that have a | |
# non-$null DefaultIPGateway property. | |
$x = gwmi -class Win32_NetworkAdapterConfiguration ` | |
-filter DHCPEnabled=TRUE | |
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/sh | |
systemctl --version >/dev/null 2>&1 && systemctl=1 | |
[ "$systemctl" ] || RUNLEVEL=$(LANG=C who -r | sed 's/.*run-level \([0-9]\).*/\1/') | |
enabled_services() { | |
if [ "$systemctl" = 1 ]; then | |
ls /etc/systemd/system/multi-user.target.wants/ | sed 's/.service$//' | |
else | |
chkconfig --list | grep "${RUNLEVEL}:on" | awk '{print $1}' |
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 | |
# GPG is hard. | |
# | |
# Best practice suggests that you should generate separate signing subkeys for | |
# regular use while protecting your primary key for exceptional purposes, such | |
# as key signing. Creating the necessary subkeys can involve a lot of typing. | |
# | |
# Other tools, such as [monkeysphere][], want an authentication subkey. Generating | |
# this yourself requires the `--expert` option to `--edit-key` and presents other |
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
[Unit] | |
Description=UCARP virtual interface %I | |
After=network.target | |
[Service] | |
Type=simple | |
EnvironmentFile=-/etc/ucarp/vip-common.conf | |
EnvironmentFile=-/etc/ucarp/vip-%I.conf | |
ExecStart=/usr/sbin/ucarp -i $BIND_INTERFACE -p $PASSWORD -v %I -a $VIP_ADDRESS -s $SOURCE_ADDRESS $OPTIONS -u $UPSCRIPT -d $DOWNSCRIPT | |
KillMode=control-group |
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
{ | |
"definitions": { | |
"Group": { | |
"description": "A user.openshift.io/v1 Group", | |
"properties": { | |
"apiVersion": { | |
"default": "user.openshift.io/v1", | |
"title": "Apiversion", | |
"type": "string" | |
}, |
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