Skip to content

Instantly share code, notes, and snippets.

View randomvariable's full-sized avatar
⬇️
Downstream. I may be slow to respond.

Naadir Jeewa randomvariable

⬇️
Downstream. I may be slow to respond.
View GitHub Profile
@randomvariable
randomvariable / netshoot.yaml
Created September 17, 2020 15:32
netshoot.yaml
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: netshoot
labels:
app: netshoot
spec:
updateStrategy:
type: RollingUpdate
#!/bin/bash
declare -A seenNamespaces
declare -A containerInfo
# Ensure ipcs command is available
ipcsPath=$(which ipcs)
if [ -z "$ipcsPath" ]; then
echo "ipcs command could not be found"
exit
@randomvariable
randomvariable / dns_client_log.ps1
Last active November 28, 2021 22:09
DNS Client Logging on Windows
function Start-DNSClientLog {
$DnsOpLog = Get-WinEvent -ListLog Microsoft-Windows-DNS-Client/Operational
$DnsOpLog.IsEnabled = $true
$DnsOpLog.SaveChanges()
}
function Get-DNSClientQueries {
foreach($event in (get-winevent Microsoft-Windows-DNS-Client/Operational | % { [xml]$_.ToXml() })) {
$Query = ($event.Event.EventData.Data | Where-Object { $_.Name -eq "QueryName" }).'#text'
@randomvariable
randomvariable / template.yaml
Last active July 13, 2021 12:03
injected template
apiVersion: v1
data: ${CNI_RESOURCES}
kind: ConfigMap
metadata:
name: cni-${CLUSTER_NAME}-crs-0
namespace: default
---
apiVersion: addons.cluster.x-k8s.io/v1alpha4
kind: ClusterResourceSet
metadata:
@randomvariable
randomvariable / goldpinger.yaml
Created September 21, 2020 22:51
goldpinger.yaml
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: goldpinger-serviceaccount
namespace: default
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
diff -Naur linux-4.19.138/drivers/net/vmxnet3/vmxnet3_drv.c ../SOURCES/linux-5.8/drivers/net/vmxnet3/vmxnet3_drv.c
--- linux-4.19.138/drivers/net/vmxnet3/vmxnet3_drv.c 2020-09-18 02:49:39.826513351 +0100
+++ ../SOURCES/linux-5.8/drivers/net/vmxnet3/vmxnet3_drv.c 2020-09-18 02:58:22.467376972 +0100
@@ -535,8 +535,8 @@
}
sz = tq->tx_ring.size * sizeof(tq->buf_info[0]);
- tq->buf_info = dma_zalloc_coherent(&adapter->pdev->dev, sz,
- &tq->buf_info_pa, GFP_KERNEL);
+ tq->buf_info = dma_alloc_coherent(&adapter->pdev->dev, sz,
---
apiVersion: cluster.x-k8s.io/v1alpha3
kind: Cluster
metadata:
labels:
cluster.x-k8s.io/cluster-name: 'test'
name: 'test'
namespace: 'default'
spec:
clusterNetwork:
@randomvariable
randomvariable / centos-install-1.8.15.sh
Last active July 23, 2019 19:07
Kubernetes 1.8.15 Install
#!/bin/sh
yum install -y curl ca-certificates
cat << EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
@randomvariable
randomvariable / spki_fingerprint.py
Last active July 12, 2019 14:07
spki_fingerprint.py
# Copyright © 2019 VMware 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
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: default-deny
spec:
podSelector: {}
policyTypes:
- Ingress