vpn-install.sh

wget https://repo.protonvpn.com/debian/dists/stable/main/binary-all/protonvpn-stable-release_1.0.8_ll.deb
sudo dpkg -i ./protonvpn-stable-release_1.0.8_all.deb && sudo apt update
sudo apt install proton-vpn-gnome-desktop
protonvpn-app

ubuntu_nvidia.sh

# 1. Confirm which nvidia-driver package is currently installed (if any)
dpkg -l | grep -E '^ii\s+nvidia-driver'

# 2. Check DKMS status to see if the NVIDIA kernel module built successfully
dkms status | grep -i nvidia

# 3. Verify whether any NVIDIA module is loaded
lsmod | grep nvidia

# 4. Inspect the kernel log for NVIDIA-related errors (filter for “nvidia”)
sudo journalctl -k | grep -i nvidia

# 5. Verify Secure Boot state (if it’s enabled, unsigned kernel modules may be blocked)
mokutil -

2434. Using a Robot to Print the Lexicographically Smallest String

You are given a string s and a robot that currently holds an empty string t. Apply one of the following operations until s and t are both empty: Remove the first character of a string s and give it to the robot. The robot will append this character to the string t. Remove the last character of a string t and give it to the robot. The robot will write this character on paper. Return the lexicographically smallest string that can be written on the paper.
/**
 * @param {string} s
 * @return {string}
 */
var robotWithString = function(s) {
    let ans = ""; // Stores the final result string
    let stack = []; // Acts as a temporary storage for characters
    let freq = new Array(26).fill(0); // Keeps track of character frequencies

    // Populate frequency array for all characters in the string
    for (let char of s) {
        freq[char.charCodeAt(0) - 'a'.charCodeAt(0)]++;
    }

    let minChar = 0; // Tracks the smallest available character

Hover and a class for if you want no hover

&:hover, &:focus {
                        &:not(.no-hover){
                            border: .1rem solid var(--primary);

                            svg use {
                                fill: var(--primary-hover);
                            }
                        }
                    }

Observe for changes and executes function

class ResetScript {
  constructor() {
    this.initialized = false;
    this.init();
  }

  init() {
    if (this.initialized) return;
    
    // Process immediately
    this.processAll();
    
    // Set up observer for dynamic content
    this.setupObserver();
    
    this.initialized = true;
  }

  processAll() {
    this.addOrSeparator();
  }

  setupObserver() {
    const observer = new MutationObserver(() => {
      this.processAll();
    });
    
    observer.

Masks shapes vertical

// Wave styling
[class*="no-tear"] {
    &::before,
    &::after {
        content: none;
    }
}

[class*="tear"] {
    position: relative;
    z-index: 10;

    &::before {
        content: '';
        mask-repeat: no-repeat;
        pointer-events: none;
        position: absolute;
        height: 100vw;
        mask-size: 100% 100%;
        top: 0;
        bottom: 0;
        background: var(--modal);
    }
}

[class*="tear-left"] {
    &::before {
        aspect-ratio: 71.29/1440;
        ma

sbt scala format

sbt scalafmtCheckAll
sbt scalafmt 
sbt test:scalafmt 

カードの角丸キャプションをcorner-shapeで実現する

<div class="title">カードのタイトル部分</div>

角の形状を変更する

.button {
  corner-shape: squircle; /* スムーズな角丸 */
  corner-shape: bevel;
  corner-shape: notch;
  corner-shape: scoop;
}

Image Gallery with masonry grid with vertical and horizontal fills

masonry grid that allows for a stackable varying sizes. Make sure to add a `- 1` to the index in image-gallery.js for the lightbox to find correct image. Uses: packery, isotope, and imagesloaded
{% assign base_classname = 'image-gallery' %}


<div class="image-gallery-wrapper">
  {% if Module.FieldValues.Content != nil and Module.FieldValues.Content != '' %}
    <header class="element-header">{{Module.FieldValues.Content}}</header>
  {% endif %}
  <section class="{{base_classname}} col-span-{{Module.FieldValues.ColumnCount | Default: '4'}}" data-gallery="gallery-{{Module.MatrixModuleId}}">
    <div class="grid-sizer"></div>
   {% for item in List.Items %}
      {% assign rand 

Styles when any clickable child is hovered

.product-card:has(a:hover, button:hover, [role="button"]:hover, input[type="submit"]:hover) {
  
}

1061. Lexicographically Smallest Equivalent String

You are given two strings of the same length s1 and s2 and a string baseStr. We say s1[i] and s2[i] are equivalent characters. For example, if s1 = "abc" and s2 = "cde", then we have 'a' == 'c', 'b' == 'd', and 'c' == 'e'. Equivalent characters follow the usual rules of any equivalence relation: Reflexivity: 'a' == 'a'. Symmetry: 'a' == 'b' implies 'b' == 'a'. Transitivity: 'a' == 'b' and 'b' == 'c' implies 'a' == 'c'. For example, given the equivalency information from s1 = "abc" and s2 = "cde", "acd" and "aab" are equivalent strings of baseStr = "eed", and "aab" is the lexicographically smallest equivalent string of baseStr. Return the lexicographically smallest equivalent string of baseStr by using the equivalency information from s1 and s2.
/**
 * @param {string} s1
 * @param {string} s2
 * @param {string} baseStr
 * @return {string}
 */
class UnionFind {
    constructor() {
        this.parent = Array.from({ length: 26 }, (_, i) => i); // 'a' to 'z'  mapped to 0-25
    }

    // Find root of the character index
    find(x) {
        if (this.parent[x] !== x) {
            this.parent[x] = this.find(this.parent[x]); // Path compression
        }
        return this.parent[x];
    }

    // Union two sets
    union(x, y) {
        l

timeout

sudo nano /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="consoleblank=180"
sudo update-grub
sudo reboot

How to configure Logger in Python

import logging

logger = logging.getLogger(__name__)

logging.basicConfig(
    level=logging.INFO,
    format="%(asctime)s [%(levelname)s] %(name)s: %(message)s",
)

Pegando o URL Atual Oracle Apex

SELECT OWA_UTIL.GET_CGI_ENV('REQUEST_SCHEME') || '://' || 
               OWA_UTIL.GET_CGI_ENV('SERVER_NAME') || 
               OWA_UTIL.GET_CGI_ENV('SCRIPT_NAME') || '/'
          AS L_AI_INSTANCIA_URL
          FROM DUAL;

SSH helpful tips

Host * 
    Port 22

Host vm_*
    IdentityFile ~/.ssh/ed25519_VM
    BatchMode yes
    
Host vm_node1
    HostName 192.168.56.1 # or vm.example.com