Skip to content

Instantly share code, notes, and snippets.

@harmakhis971
harmakhis971 / reset.md
Created August 3, 2026 07:48 — forked from hitautodestruct/reset.md
Reset root password on scaleway.com
@harmakhis971
harmakhis971 / gitlab.md
Created July 31, 2026 07:37 — forked from iamstoick/gitlab.md
Gitlab CLI commands

Gitlab gitlab-ctl commands.

Example to start Gitlab services: sudo gitlab-ctl start

deploy-page
  Put up the deploy page
remove-accounts
  Delete *all* users and groups used by this package
upgrade
@harmakhis971
harmakhis971 / inject-pin.sh
Created July 17, 2026 07:55 — forked from RichieB2B/inject-pin.sh
PIN inject script for openvpn PKCS11 smart cards
#!/bin/bash
cd /etc/openvpn
function waitforport {
i=0
# Wait for openvpn management interface
while ! timeout 1 bash -c 'cat < /dev/null > /dev/tcp/127.0.0.1/8888' 2> /dev/null; do
i=$((i+1))
if [ $i -gt 10 ]; then

Keycloak Admin CLI Cheat Sheet

This document provides some examples about how to use kcadm to manage a realm's configuration.

Configuring Token Exchange Permission for a Client

Enable permissions to a client

./kcadm.sh update clients/{client_id}/management/permissions -f - << EOF 
@harmakhis971
harmakhis971 / postgres-cheatsheet.md
Created December 20, 2025 22:14 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@harmakhis971
harmakhis971 / renew-gpgkey.md
Created September 23, 2025 12:51 — forked from krisleech/renew-gpgkey.md
Renew Expired GPG key

Renew GPG key

Given that your key has expired.

$ gpg --list-keys
$ gpg --edit-key KEYID

Use the expire command to set a new expire date:

@harmakhis971
harmakhis971 / README.md
Created April 16, 2025 08:40 — forked from kiler129/README.md
Run iLO remote console from shell

iLO Remote Console

This small script lets you start iLO Java-based console from shell.

But why not HTML5?

  • iLO 2/3 doesn't have HTML5 console
  • Mounting local (from the client computer) ISOs is PAINFULLY slow via HTML5 client

TL;DR

If you just start it, it will ask you for everything:

@harmakhis971
harmakhis971 / ubuntu-server-hardening.md
Created November 15, 2024 08:40 — forked from mirajehossain/ubuntu-server-hardening.md
ubuntu-server-hardening checklist

Ubuntu-Server-Hardening

1. Secure Shared Memory

What is shared memory?

Shared memory is an efficient means of passing data between programs. Because two or more processes can use the same memory space, it has been discovered that, since shared memory is, by default, mounted as read/write, the /run/shm space can be easily exploited. That translates to a weakened state of security.

If you’re unaware, shared memory can be used in an attack against a running service. Because of this, you’ll want to secure that portion of system memory.

@harmakhis971
harmakhis971 / README.md
Created July 17, 2024 08:19 — forked from jjenkins70/README.md
Vault Transit Secrets Example.

vault server --dev --dev-root-token-id="root" PreReq: export VAULT_ADDR=http://127.0.0.1:8200/ export VAULT_TOKEN=root

# Enable transit secrets engine
path "sys/mounts/transit" {
  capabilities = [ "create", "read", "update", "delete", "list" ]
}
@harmakhis971
harmakhis971 / idracclient.py
Created June 26, 2024 13:28 — forked from TheJJ/idracclient.py
Dell iDRAC linux/mac/windows client launcher
#!/usr/bin/env python3
"""
Dell iDRAC client launcher for Linux, macOS and Windows.
probably works with Dell iDRAC 6/7/8
Downloads needed Java files and sets up port forwarding via SSH.
example usage: ./idracclient.py -J jumphost.lol.domain srv42-serviceprocessor.lol.domain
for more info, see ./idracclient.py --help