Avoid typing backticks twice (on Linux and Windows) using the instructions below :)
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 | |
# Copyright (c) 2020 MagnaX Software | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
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
apiVersion: policy/v1beta1 | |
kind: PodSecurityPolicy | |
metadata: | |
name: developers-psp | |
spec: | |
privileged: false | |
allowPrivilegeEscalation: false | |
hostNetwork: false | |
hostPID: false | |
hostIPC: false |
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
--- | |
- hosts: localhost | |
vars: | |
- dnsname: your.dns.name | |
- tmppath: "./tmp/" | |
- crtpath: "{{ tmppath }}{{ dnsname }}.crt" | |
- pempath: "{{ tmppath }}{{ dnsname }}.pem" | |
- csrpath: "{{ tmppath }}{{ dnsname }}.csr" | |
- pfxpath: "{{ tmppath }}{{ dnsname }}.pfx" | |
- private_key_password: "password" |
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
variable "aws_region" { | |
description = "EC2 Region for the VPC" | |
default = "us-west-2" | |
} | |
variable "aws_availability_zones" { | |
default = "us-west-2a,us-west-2b,us-west-2c" | |
description = "List of availability zones, use AWS CLI to find your " | |
} |
Create the following folder structure in your cookbook:
test
└── integrationq
├── helpers
│ ├── serverspec
│ │ ├── shared_serverspec_tests
│ │ │ └── shared_tests2.rb
│ │ └── spec_helper.rb
This is based on the outdated, official Cacti configuration for ADSL Line and modified for Draytek Vigor support.
Changes from the original include:
- Extra data sources
- Removed unimplemented data sources
- Updated for newer versions of Cacti
- Download this gist as a
.zip
file by clicking the button to the left labelled "Download Gist"
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
# NOTE: These patterns take into account the additional log-line information passed to the logstash listener from rsyslog. YMMV. | |
DHCPD ((%{SYSLOGTIMESTAMP:timestamp})\s*(%{HOSTNAME:hostname})\s*dhcpd\S+\s*(%{WORD:dhcp_action})?.*[for|on] (%{IPV4:dhcp_client_ip})?.*[from|to] (%{COMMONMAC:dhcp_client_mac})?.*via (%{USERNAME:interface})) | |
IPTABLES ((%{SYSLOGTIMESTAMP:nf_timestamp})\s*(%{HOSTNAME:nf_host})\s*kernel\S+\s*(%{WORD:nf_action})?.*IN=(%{USERNAME:nf_in_interface})?.*OUT=(%{USERNAME:nf_out_interface})?.*MAC=(%{COMMONMAC:nf_dst_mac}):(%{COMMONMAC:nf_src_mac})?.*SRC=(%{IPV4:nf_src_ip}).*DST=(%{IPV4:nf_dst_ip}).*PROTO=(%{WORD:nf_protocol}).?*SPT=(%{INT:nf_src_port}?.*DPT=%{INT:nf_dst_port}?.*)) | |
DNS ((%{MONTHDAY:day})-(%{MONTH:month})-(%{YEAR:year}) (%{TIME:timestamp}) client (%{IPV4:dns_client_ip})#(%{NONNEGINT:dns_uuid})?.*query: (%{HOSTNAME:dns_dest}) (%{WORD:dns_type}) (%{WORD:dns_record})?.*(%{IPV4:dns_server})) | |
PGSQL ((%{SYSLOGTIMESTAMP:pgsql_timestamp}) (%{HOSTNAME:pgsql_hostname})?.*SAST >(%{WORD:pgs |
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
module Serverspec | |
module Type | |
class Partition < Base | |
def initialize(partition, type) | |
@name = partition | |
@partition_table = {} | |
case type | |
when 'cylinder' | |
options = "-l" |
NewerOlder