Skip to content

Instantly share code, notes, and snippets.

View ergoz's full-sized avatar
😈
let's rock

[riftlab] ErgoZ ergoz

😈
let's rock
View GitHub Profile
@ergoz
ergoz / bucket-policies-primer.md
Created September 16, 2024 19:55 — forked from krishnasrinivas/bucket-policies-primer.md
Explanation of bucket polices by example

Bucket Policy

Bucket policy is an access policy available for you to grant anonymous permissions to your Minio resources. Bucket policy uses JSON-based access policy language.

This section presents a few examples of typical use cases for bucket policies. The policies use testbucket strings in the resource value. To test these policies, you need to replace these strings with your bucket name. For more information please read Amazon S3 access policy language

Granting Read-Only Permission to an Anonymous User

The following example policy grants the s3:GetObject permission to any public anonymous users. This permission allows anyone to read the object data under testbucket, which is useful for when you have publicly readable assets. A typical example is a website assets stored in testbucket.

@ergoz
ergoz / README.md
Created September 16, 2024 19:54 — forked from CosmicToast/README.md
Useful MinIO policies

Some useful policies for MinIO

A small collection, because reasons.

User Policies

To apply these:

  1. Download the file.
  2. mcli admin policy add MYMINIO NAME NAME.json (replace MYMINIO with your configured instance and NAME with the filename).
  3. mcli admin policy set MYMINIO NAME user=USER (same as above, replace USER with the user you want to configure).
@ergoz
ergoz / index.html
Created September 5, 2024 16:13 — forked from AmirrezaNasiri/index.html
Telegram Share Button in HTML
<!--
This is a simple URL share button for Telegram application.
It's compatible with iOS/Android app, Telegram Desktop and uses its web mode for fallback.
-->
<a href="https://t.me/share/url?url={url_to_share}&text={caption_text}&to={phone_number}">
Share Me
</a>
<!--
#!/bin/env sh
lines=$(tput lines)
cols=$(tput cols)
awkscript='
{
letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"
lines=$1
@ergoz
ergoz / virt-customize-ubuntu22
Created August 22, 2024 00:39 — forked from si458/virt-customize-ubuntu22
virt-customize ubuntu22
#!/bin/sh
# install tools
apt update -y && apt install nano wget curl libguestfs-tools -y
# remove old image
rm -rfv ubuntu-22.04-server-cloudimg-amd64-disk-kvm.img
# remove old template container - WILL DESTROY COMPLETELY
qm destroy 9000 --destroy-unreferenced-disks 1 --purge 1
# download new image
wget http://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-amd64-disk-kvm.img
# add agent to image
@ergoz
ergoz / create-cloud-template.sh
Created August 19, 2024 08:21 — forked from meramsey/create-cloud-template.sh
This script will download a cloud image of many Linux distros and create a Proxmox 6 KVM template from it.
#!/bin/bash
set -o errexit
clear
printf "\n*** This script will download a cloud image and create a Proxmox VM template from it. ***\n\n"
### HOW TO USE
### Pre-req:
### - run on a Proxmox 6 server
### - a dhcp server should be active on vmbr1
@ergoz
ergoz / 01-netcfg.yaml
Created August 18, 2024 18:58 — forked from nkabir/01-netcfg.yaml
libguestfs examples
# may be templated in the future
network:
version: 2
renderer: networkd
ethernets:
eth0:
dhcp4: true
optional: true
@ergoz
ergoz / create-cloud-init.sh
Last active August 18, 2024 18:20 — forked from casperghst42/create-cloud-init.sh
Create a cloud-init Debian 12 image on proxmox
#!/bin/bash
# Author: Casper Pedersen (github.com/casperghst42)
# License: GPL2
wget https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-generic-amd64.qcow2
virt-customize -a debian-12-generic-amd64.qcow2 \
--install qemu-guest-agent \
--install resolvconf \
--install systemd-resolved \
--update \
@ergoz
ergoz / Ubuntu_Debian_Cloud_images_in_Proxmox.md
Created August 18, 2024 18:18 — forked from chriswayg/Ubuntu_Debian_Cloud_images_in_Proxmox.md
Ubuntu and Debian Cloud images in Proxmox
@ergoz
ergoz / proxmox-install.sh
Created August 18, 2024 10:45 — forked from willwm/proxmox-install.sh
Fresh Proxmox Server install script
#!/bin/bash
# TODO: Remove pve-enterprise, add pve-no-subscription repo to sources.list(*)
# Update packages, install essentials
apt update
apt install -y build-essential git zsh htop
# Update Proxmox Appliance Manager (https://forum.proxmox.com/threads/no-turnkey-fresh-install-5-1-35.38199/)
pveam update