Skip to content

Instantly share code, notes, and snippets.

dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf --enablerepo=codeready-builder-for-rhel-8-x86_64-rpms install -y $(echo "
bison make gcc gcc-c++ flex
cyrus-sasl-devel
glib2-devel
hiredis-devel
java-devel
json-c-devel
libcap-devel
libcurl-devel
RHEL 8 on WSL
================
https://console.redhat.com/preview
Make sure 'preview' is enabled in the top right
Services->Deploy->Images
Create Blueprint
#!/usr/bin/env python
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
"""
An example to show receiving events from an Event Hub.
template(
name="RSYSLOG_SyslogProtocol23Format_NoHead"
type="string"
string="%TIMESTAMP:::date-rfc3339% %HOSTNAME% %APP-NAME% %PROCID% %MSGID% %STRUCTURED-DATA% %msg%\n"
)
template (name="DynFile" type="string" string="/var/log/docker/%app-name%.log")
template(
name="MSG_only"
Notes on RPM signatures.
Background
-----------
Yum is not rpm.
Yum trusts signatures on yum repository metadata.
Rpm trusts signatures on individual rpm packages.
They have separate keyrings.
@jonuwz
jonuwz / run.py
Created February 1, 2022 10:47
sample api server for splunk ingest
#!/usr/bin/env python3
"""
This mimics an api where you fetch audit logs for a particular time range.
The /audit path accepts 2 query parameters, 'start' and 'end'
These are the start and end times for the query, expressed as an epoch
start defaults to 0
end defaults to now
10 random logs are returned between these times
@jonuwz
jonuwz / gist:b0576257d7dd99d094bbd773433c1bde
Last active September 2, 2021 17:23
list subs if service principal has been added to > 1 sub
# pip install azure-mgmt-resource azure-identity
import os
import json
from azure.mgmt.resource import SubscriptionClient
from azure.identity import ClientSecretCredential
active_dict= {}
t_id = ''
username = ''
/*
* Copyright 2011 Splunk, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"): you may
* not use this file except in compliance with the License. You may obtain
* a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
options {
flush_lines (0);
time_reopen (10);
log_fifo_size (1000);
chain_hostnames (off);
use_dns (no);
use_fqdn (no);
create_dirs (no);
keep_hostname (yes);
};

Single (soon to be multi) node kubernetes backed by ceph storage on Raspberry Pi 4

Hardware

4 * Raspberry Pi 4B 4GB
1 * Sandisk Extreme A1 32GB
3 * Sandisk Ultra A1 32GB
4 * TOPK Type C Cable QC 3.0 Fast Charge
4 * CSL - Flat Ethernet Cable Cat6 0.25m
1 * Anker PowerPort 60 W 6-Port USB Charger with PowerIQ