HAXE getter setter

//Read and write access from anywhere but only exception is the physical variable cannot be accessed within getter and setter functions without metadata @:isVar
public var x(get, set):Float;

//Can be read from anywhere, modified only within the class
public var x(default, null):Float;

//Can be set from anywhere, modified only within the class
public var x(null, default):Float;

//Read-only from anywhere even within the same class
public var x(get, never):Float;

//Read and write ac

Cursor install Linux



1) create a cursor directory in /opt

cd /opt
mkdir cursor

2) download cursor.appimage

3) move cursor.appimage to /opt/cursor
4) download cursor png image to /opt/cursor

5) create cursor.desktop in /usr/share/applications
Copy the following contents, match directory and file paths here if differnt
[Desktop Entry]
Name=Cursor
Exec=/opt/cursor/cursor.appimage --no-sandbox
Icon=/opt/cursor/cursor.png
Type=Application
Categories=Development;























1432. Max Difference You Can Get From Changing an Integer

You are given an integer num. You will apply the following steps to num two separate times: Pick a digit x (0 <= x <= 9). Pick another digit y (0 <= y <= 9). Note y can be equal to x. Replace all the occurrences of x in the decimal representation of num by y. Let a and b be the two results from applying the operation to num independently. Return the max difference between a and b. Note that neither a nor b may have any leading zeros, and must not be 0.
/**
 * @param {number} num
 * @return {number}
 */
var maxDiff = function(num) {
    let numStr = num.toString(); // Convert number to string for easy mainpulation


    // **Step 1: Find the maximum number by replacing the first non-9 digit with 9**
    let maxNumStr = numStr;
    for (let i = 0; i < numStr.length; i++) {
        if (numStr[i] !== '9') {
            maxNumStr = numStr.replaceAll(numStr[i], '9');
            break; // Only replace the first non-9 digit found
        }
    }
    

Makefile for project setup

Makefile for initial set up of project
# CloudBridge DevOps Platform - Makefile
# This Makefile sets up the entire project structure and provides development commands

.PHONY: help setup clean build test proto frontend backend docker dev-up dev-down migrate lint format

# Default target
.DEFAULT_GOAL := help

# Variables
PROJECT_NAME := cloudbridge
GO_VERSION := 1.21
NODE_VERSION := 23.6.0
# Updated to current versions as of June 2025
PROTO_VERSION := 31.1
PROTOC_GEN_GO_VERSION := 1.36.6
PROTOC_GEN_GO_GRPC_VERSION := 1.5.1
BUF_VERSIO

Kali Linux AMI setup

# AWS Kali Linux AMI Builder Automated script to convert a Parallels Desktop Kali Linux VM into an AWS AMI (Amazon Machine Image) for cloud deployment. ## 🎯 Purpose Converts your local Parallels Kali Linux VM into a deployable AWS AMI, enabling you to launch Kali instances in the cloud for penetration testing and security research. ## ⚡ What It Does 1. **AWS Setup** - Creates S3 bucket and IAM roles for VM Import/Export 2. **VM Preparation** - Safely stops Parallels VM and converts disk to plain format 3. **Format Conversion** - Converts Parallels `.hdd` to AWS-compatible VMDK using qemu-img 4. **Cloud Upload** - Uploads VMDK file to S3 bucket 5. **AMI Creation** - Imports VMDK as EC2 AMI using AWS VM Import service 6. **Progress Monitoring** - Tracks import progress with automatic status updates 7. **Cleanup** - Removes temporary files after successful import ## 📋 Requirements - **Parallels Desktop** with Kali Linux VM - **AWS CLI** configured with appropriate permissions - **qemu-img** (auto-installed via Homebrew if missing) - **AWS Permissions**: S3, EC2, IAM access - **Disk Space**: ~2x VM size for temporary conversion files ## 🔧 Configuration Update these variables before running: ```bash PARALLELS_VM_NAME="Kali Linux 2024.2 ARM64" S3_BUCKET="your-unique-bucket-name" PARALLELS_DISK_PATH="/path/to/VM.pvm/disk.hdd" AWS_REGION="us-east-1" ``` ## 🚀 Usage ```bash chmod +x build-kali-linux.sh ./build-kali-linux.sh ``` ## ⏱️ Expected Runtime - **VM Conversion**: 5-15 minutes - **S3 Upload**: 10-30 minutes (depending on VM size) - **AMI Import**: 20-60 minutes - **Total**: 45-120 minutes ## 📤 Output - **S3 VMDK File**: `s3://bucket/kali-exported.vmdk` - **AWS AMI**: Ready-to-launch AMI ID - **Launch Command**: Provided for immediate instance deployment ## 💰 Cost Considerations - **S3 Storage**: ~$0.023/GB/month (delete after import) - **Data Transfer**: ~$0.09/GB upload - **AMI Storage**: ~$0.05/GB/month (EBS snapshots) ## 🔒 Security Notes - Creates minimal IAM permissions for VM import only - S3 bucket restricted to AWS VM Import service - Supports encrypted AMI creation for sensitive workloads ## 🛠️ Troubleshooting - **qemu-img missing**: Auto-installs via Homebrew - **Permission errors**: Check AWS credentials and IAM policies - **Import failures**: Verify VM is properly shut down and disk format ## 📝 Example Output ``` [*] S3 bucket created successfully [*] Converting Parallels HDD to plain format... [*] Found disk file: harddisk1.hds [*] Converting to VMDK format... [*] Uploading to S3... (15.1 GiB) [*] Import task created: import-ami-1234567890abcdef0 [*] Import status: active → completed [*] AMI ID: ami-0123456789abcdef0 ```
#!/bin/bash
set -e

# --- CONFIGURATION ---
PARALLELS_VM_NAME="Kali Linux 2024.2 ARM64"         # Name of your Parallels VM
RAW_IMAGE="kali-exported.raw"
S3_BUCKET="domhallan-kali-linux-bucket"
AWS_REGION="us-east-1"
# shellcheck disable=SC2034
PACKER_TEMPLATE="kali-aws.json"
# shellcheck disable=SC2034
USER_DATA="user-data.sh"
IMPORT_ROLE_NAME="vmimport"
PARALLELS_DISK_PATH="/Users/domhallan/Parallels/Kali Linux 2024.2 ARM64.pvm/kali-linux-2024.2-0.hdd"
TEMP_VMDK="kali-temp.vmdk"

# --- 0. CREA

2566. Maximum Difference by Remapping a Digit

You are given an integer num. You know that Bob will sneakily remap one of the 10 possible digits (0 to 9) to another digit. Return the difference between the maximum and minimum values Bob can make by remapping exactly one digit in num. Notes: When Bob remaps a digit d1 to another digit d2, Bob replaces all occurrences of d1 in num with d2. Bob can remap a digit to itself, in which case num does not change. Bob can remap different digits for obtaining minimum and maximum values respectively. The resulting number after remapping can contain leading zeroes.
/**
 * @param {number} num
 * @return {number}
 */
var minMaxDifference = function(num) {
    let numStr = num.toString();

    // Finding the max number
    let maxDigit = numStr.split('').find(d => d !== '9'); // First non-9 digit
    let maxNum = parseInt(numStr.replaceAll(maxDigit, '9'), 10);

    // Finding the min number
    let minDigit = numStr.split('').find(d => d !== '0'); // First non-zero digit
    let minNum = parseInt(numStr.replaceAll(minDigit, '0'), 10);

    return maxNum - min

Modals


<div id="{{ id }}" class="modal modal--{{ right ? 'right' : 'left' }}">
    <div class="modal__overlay"></div>
    <div class="modal__content">
        <div class="close-modal icon-background icon-light">{% include 'partials/svg.twig' with{attr_width: '15', attr_height: '15', id: 'cancel', ariaLabel: 'Closing cross'} %}</div>
        <div class="modal__inner-content">
            {{ content }}
        </div>
        <div class="modal-shape">
            {% if right %}
                <svg xmlns

Pagination with color variants


.pagination {
    padding: 15vh 0;
    display: flex;
    justify-content: center;

    ul {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: .5rem;
        list-style: none;
        margin: 0;
        padding: 0;

        @include respond-to(from-sm) {
            gap: var(--gap-sm);
        }


        li {
            a, span {
                display: inline-flex;
                justify-content: center;
                align-items: center;
     

Pagination (rounded with hidden arrow)

{% if posts.pagination.total > 1 %}
    {% set current = posts.pagination.current %}
    {% set total = posts.pagination.total %}

    <ul>
        <li class="prev{% if not posts.pagination.prev %} disabled{% endif %}">
            <{{ posts.pagination.prev ? 'a href="' ~ pagination_link(posts.pagination.prev.link, overview_url) ~ '"' : 'span'}} data-page-nr="{{ current - 1 }}">
            {% include 'partials/svg.twig' with { id: 'arrow', attr_width: '13', attr_height: '13', ariaLabel: 'Pijl'}

Remove section path from URL (Works for all anchor types, including "/#about")

<!--========== 💙 MEMBERSCRIPT #136 💙 REMOVE SECTION PATH FROM URL (Works for all anchor types) ==========-->
<script>

document.addEventListener('DOMContentLoaded', function () {
    
    // Function to scroll and clean the URL
    function scrollAndClean(id) {
        const targetElement = document.getElementById(id);
        if (targetElement) {
            targetElement.scrollIntoView({ behavior: 'smooth' });
            setTimeout(() => {
                history.replaceState(null, document.t

Get-MofManagementPath

function Get-MofManagementPath {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)]
        [string[]]$Path
        ,
        [switch]$CheckExist
    )

    process {
        Write-Verbose "CheckExist: $($CheckExist.IsPresent)"
        foreach ($PathItem In $Path) {
            $mof = Get-Item -Path $PathItem
            
            $FileContents = Get-Content -Path $mof.FullName

Raw file contents to array of lines (strings)

$FileContents = Get-Content -Path "$env:windir\system32\wbem\cimwin32.MOF" -Raw
($FileContents -replace '\n', "`r`n") -split "`r`n"

2616. Minimize the Maximum Difference of Pairs

You are given a 0-indexed integer array nums and an integer p. Find p pairs of indices of nums such that the maximum difference amongst all the pairs is minimized. Also, ensure no index appears more than once amongst the p pairs. Note that for a pair of elements at the index i and j, the difference of this pair is |nums[i] - nums[j]|, where |x| represents the absolute value of x. Return the minimum maximum difference among all p pairs. We define the maximum of an empty set to be zero.
/**
 * Function to minimize the maximum difference between pairs in a sorted array.
 * @param {number[]} nums - Array of numbers to be paired.
 * @param {number} p - Target number of pairs.
 * @return {number} - Minimum possible maximum difference between pairs.
 */
var minimizeMax = function(nums, p) {
    // Sort the numbers in ascending order
    nums.sort((a, b) => a - b);

    let left = 0;
    let right = nums[nums.length - 1] - nums[0];

    // Binary search to find the minimum possible m

smooth nav opening animation

instead of the clunky `height:0` to `height: auto`, use this for a smooth opening animation. Uses `display:grid` and `interpolate-size: allow-keywords` [https://caniuse.com/mdn-css_properties_interpolate-size_allow-keywords]
li {
    position: relative;
    margin: 0;
    &[id*="item--home"] {display: none!important;}
    &.item--has-children {
        margin: 0;
        display: grid;
        grid-template-rows: min-content 0fr;
        transition: grid-template-rows 0.33s ease-in-out;
    }
    // tier 2
    > ul {
        overflow: hidden;
        height: 0px;
        interpolate-size: allow-keywords;
        transition: height .33s ease-in-out;
        overflow-y: clip;
        > li {
         

Lisa

![](https://cdn.cacher.io/attachments/u/3mdb8zlwid8no/fRocJV4b_P-BAYRkhG9-MFnhG1J9W_Lp/0xeq05sgf.png)

![](https://cdn.cacher.io/attachments/u/3mdb8zlwid8no/1eV9v5TnYDwHQVAz2dzc1u0CuTTUSiYx/8ahdy4qr1.png)


![](https://cdn.cacher.io/attachments/u/3mdb8zlwid8no/naKn36Kz7lSUEkFHnODPm3PDuSdEjfaZ/uaj3z17lp.png)


![](https://cdn.cacher.io/attachments/u/3mdb8zlwid8no/nPfPbyJKP0DDDbosRQLlpl5oj6i9zFOO/4swmbl0lq.png)


![](https://cdn.cacher.io/attachments/u/3mdb8zlwid8no/MzKwjrO1O9bwxRvFiTNvEWHqQf1-ccN

Теги

```
# 1. Переключаемся на нужную ветку
git checkout main

# 2. Обновляем локальный репозиторий
git pull origin main

# 3. Создаём аннотированный тег
git tag -a v1.0 -m "Выпуск версии 1.0"

# 4. Пушим тег в удалённый репозиторий
git push origin v1.0
```