This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POST `https://PROJECT_URL/admin/recovery/code` | |
``` | |
--header 'Content-Type: application/json' | |
--header 'Authorization: YOUR_ORI_ADMIN_ACCESS_TOKEN' | |
body= | |
{ | |
"expires_in": "5m", | |
"identity_id": "SOME_USER_ID_GUID", | |
"flow_type": "api" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ======================== Elasticsearch Configuration =========================imm | |
# | |
# NOTE: Elasticsearch comes with reasonable defaults for most settings. | |
# Before you set out to tweak and tune the configuration, make sure you | |
# understand what are you trying to accomplish and the consequences. | |
# | |
# The primary way of configuring a node is via this file. This template lists | |
# the most important settings you may want to configure for a production cluster. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install -y rsync | |
sudo mkfs.ext4 /dev/disk/azure/scsi1/lun$1 | |
sudo mkdir -p /mnt/data | |
sudo mount /dev/disk/azure/scsi1/lun$1 /mnt/data | |
sudo rsync -av /var/lib/elasticsearch/ /mnt/data/ | |
echo "/dev/disk/azure/scsi1/lun$1 /mnt/data ext4 defaults 0 0" | sudo tee -a /etc/fstab | |
sudo sed -i 's|path.data: /var/lib/elasticsearch|path.data: /mnt/data|g' /etc/elasticsearch/elasticsearch.yml | |
sudo systemctl restart elasticsearch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$TTL 604800 | |
@ IN SOA ns1.postgres.database.azure.com. admin.postgres.database.azure.com. ( | |
2023101601 ; Serial | |
604800 ; Refresh | |
86400 ; Retry | |
2419200 ; Expire | |
604800 ) ; Negative Cache TTL | |
; | |
@ IN NS ns1.postgres.database.azure.com. | |
ns1 IN A 10.7.5.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zone "postgres.database.azure.com" { | |
type master; | |
file "/etc/bind/db.postgres.database.azure.com"; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from base64 import b64encode | |
from nacl import encoding, public | |
def encrypt(public_key: str, secret_value: str) -> str: | |
"""Encrypt a Unicode string using the public key.""" | |
public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) | |
sealed_box = public.SealedBox(public_key) | |
encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) | |
return b64encode(encrypted).decode("utf-8") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
sudo apt-get update | |
sudo apt-get install -y python3-pip python3-venv | |
python3 -m venv myenv | |
source myenv/bin/activate && pip install pynacl | |
# GitHub Repository | |
repo_owner="readydataAG" | |
repo_name="immoledo-rewrite" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install -y rsync | |
sudo mkfs.ext4 /dev/disk/azure/scsi1/lun$1 | |
sudo mkdir -p /mnt/data | |
sudo mount /dev/disk/azure/scsi1/lun$1 /mnt/data | |
sudo rsync -av /var/lib/elasticsearch/ /mnt/data/ | |
echo "/dev/disk/azure/scsi1/lun$1 /mnt/data ext4 defaults 0 0" | sudo tee -a /etc/fstab | |
sudo sed -i 's|path.data: /var/lib/elasticsearch|path.data: /mnt/data|g' /etc/elasticsearch/elasticsearch.yml | |
sudo systemctl restart elasticsearch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public string HashSecret(string secret) { | |
using var sha256 = SHA256.Create(); | |
// Compute hash of the password | |
var hashBytes = sha256.ComputeHash(Encoding.UTF8.GetBytes(secret)); | |
// Convert byte array to a hexadecimal string | |
var builder = new StringBuilder(); | |
foreach (var t in hashBytes) { | |
builder.Append(t.ToString("x2")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
<style> | |
body, html { | |
min-height: 100vh; | |
padding: 0; | |
margin: 0; |
NewerOlder