Skip to content

Instantly share code, notes, and snippets.

@ergoz
ergoz / remove-subscription-banner.sh
Created October 9, 2024 03:06 — forked from mrl22/remove-subscription-banner.sh
Proxmox Mail Gateway - Disable Subscription Key Pop Up
#!/bin/bash
sed -i 's#checked_command: function(orig_cmd) {#checked_command: function(orig_cmd) { return true;#ig' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
@ergoz
ergoz / example.go
Last active October 8, 2024 11:52 — forked from lmammino/example.go
Ldap filter beautifier
package main
import (
"fmt"
"./ldap"
)
var filter = "(&(&(&(& (mailnickname=*) (| (&(objectCategory=person)(objectClass=user)(|(homeMDB=*)(msExchHomeServerName=*))) )))(objectCategory=user)(department=IT)(physicalDeliveryOfficeName=Amsterdam)))"
func main() {
@ergoz
ergoz / LetsEncrypt389DS.md
Created October 7, 2024 13:40 — forked from plembo/LetsEncrypt389DS.md
Let's Encrypt 389 Directory Server

Let's Encrypt the 389 Directory Server

The following procedure is for installing a wildcard cert and key paid from Let's Encrypt for the 389 Directory Server.

  1. Use the 389 Console gui to create a certificate database db and to import the Let's Encrypt certificate chain cert (which will be in PEM format). See secs. 9.1.3.2 and 9.3.3.2 of the Red Hat Directory Server Administration Guide for details.

  2. Create a pin.txt file under /etc/dirsrv/slapd-[instance name]:

Internal (Software) Token:agoodpassword
@ergoz
ergoz / resize_disk_image.md
Created September 30, 2024 14:38 — forked from joseluisq/resize_disk_image.md
How to resize a qcow2 disk image on Linux

How to resize a qcow2 disk image on Linux

This example takes olddisk.qcow2 and resizes it into newdisk.qcow2, extending one of the guest's partitions to fill the extra space.

1. qcow2 format

1.1. Verify the filesystems of olddisk.qcow2

@ergoz
ergoz / alpine-cloud-init.md
Last active September 30, 2024 01:29 — forked from longtian/alpine-cloud-init.md
cloud-init for alpine on proxmox

Enable cloud-init for a Alpine VM on proxmox

alpine version 3.20.3 cloud-init version 22.4

Install

Download alpine-virt-3.20.3-x86_64.iso Uploda to PVE Create a VM

@ergoz
ergoz / noVNCCopyPasteProxmox.user.js
Last active February 16, 2025 23:31 — forked from amunchet/noVNCCopyPasteProxmox.user.js
Copy/Paste for noVNC Proxmox
// ==UserScript==
// @name noVNC Paste for Proxmox
// @namespace http://tampermonkey.net/
// @version 0.2a
// @description Pastes text into a noVNC window (for use with Proxmox specifically)
// @author Chester Enright
// @match https://*
// @include /^.*novnc.*/
// @require http://code.jquery.com/jquery-3.3.1.min.js
// @grant none
@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>
<!--
@ergoz
ergoz / matrix-shell.sh
Last active September 29, 2024 14:08 — forked from jezstephens/gist:c34b3b803928a22631df
Matrix Effect in you terminal
#!/bin/env sh
lines=$(tput lines)
cols=$(tput cols)
awkscript='
{
letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"
lines=$1