I hereby claim:
- I am nixknight on github.
- I am nixknight (https://keybase.io/nixknight) on keybase.
- I have a public key ASBNYm02rM6ZSFXJKlx89D2pI-7JB9eit7zmusFDsHh74wo
To claim this, I am signing this object:
import requests | |
# Replace 'your_cloudflare_api_token_here' with your actual Cloudflare API token | |
api_token = "your_cloudflare_api_token_here" | |
# The URL for the Cloudflare API endpoint to check user details | |
url = "https://api.cloudflare.com/client/v4/user/tokens/verify" | |
# The headers including the API token for authentication | |
headers = { |
import hvac | |
import os | |
from tabulate import tabulate | |
from hvac.exceptions import VaultError | |
# Initialize the HashiCorp Vault client using environment variables for address and token | |
client = hvac.Client( | |
url=os.environ['VAULT_ADDR'], # Vault server address | |
token=os.environ['VAULT_TOKEN'] # Authentication token | |
) |
import sys | |
import psutil | |
from tabulate import tabulate | |
def get_top_memory_processes(n=10): | |
# Fetch all processes | |
processes = [p.info for p in psutil.process_iter(attrs=['pid', 'name', 'memory_percent', 'memory_info'])] | |
# Sort the processes based on memory percentage used | |
processes.sort(key=lambda x: x['memory_percent'], reverse=True) |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: default-test | |
namespace: argoproj | |
spec: | |
containers: | |
- name: default-test | |
image: debian:bullseye | |
command: |
#!/usr/bin/env bash | |
# +------------------------------------------------------------------------------------------+ | |
# + FILE: ansible-wrapper + | |
# + + | |
# + AUTHOR: Saad Ali (https://github.com/NIXKnight) + | |
# + To be used with https://github.com/NIXKnight/Docker-Kube-Utils.git + | |
# +------------------------------------------------------------------------------------------+ | |
export K8S_SERVICEACCOUNT_DIR="/var/run/secrets/kubernetes.io/serviceaccount" |
import requests | |
AWS_ELB_META_IPV4_URL = "http://169.254.169.254/latest/meta-data/local-ipv4" | |
ELB_HEALTHCHECK_HOSTNAME = requests.get(AWS_ELB_META_IPV4_URL, timeout=5).text | |
ALLOWED_HOSTS += [ELB_HEALTHCHECK_HOSTNAME] |
I hereby claim:
To claim this, I am signing this object:
from passlib.hash import md5_crypt | |
# Suppose that password hash for PostfixAdmin admin user is $1$deceb114$ABCDefghIJKLmN09Q4sTn/ | |
# The salt will be the part between $1$ and $. Hence: | |
salt = 'deceb114' | |
# The print command below will generate a PostfixAdmin compatible MD5 hash of the password (which is KNIGHT) | |
print md5_crypt.using(salt=salt).hash('KNIGHT') |