It understands files such as:
## global definitions
global:
debug: yes
verbose: no
debugging:
detailed: no
header: "debugging started"| (async function exportGeminiChat() { | |
| const sleep = ms => new Promise(r => setTimeout(r, ms)); | |
| const NONCE = Math.random().toString(36).slice(2, 7) + Date.now().toString(36).slice(-4); | |
| // Helper: Fast SHA-256 for secure contexts (Gemini is always HTTPS) | |
| async function sha256(text) { | |
| try { | |
| const msgBuffer = new TextEncoder().encode(text); | |
| const hashBuffer = await crypto.subtle.digest('SHA-256', msgBuffer); | |
| return Array.from(new Uint8Array(hashBuffer)).map(b => b.toString(16).padStart(2, '0')).join(''); |
| <# | |
| Core Functional Requirements | |
| 1. **Structure & Invocation:** | |
| - The `.ps1` script defines a function (`Sync-AcronymTable`) with a concise comment-based help docstring. | |
| - Executing the `.ps1` file directly invokes the function with all passed arguments. | |
| - Dot-sourcing the `.ps1` file (`. .\Sync-AcronymTables.ps1`) loads the function into the session without executing it. | |
| - Must be compatible with both Windows PowerShell 5.1 and PowerShell 7+. | |
| - Must support standard PowerShell `-WhatIf` (`SupportsShouldProcess`). | |
| 2. **Input Handling & Extraction:** | |
| - Accepts one or more Markdown (`.md`, `.markdown`) or YAML (`.yaml`, `.yml`) files. |
| #!/bin/bash | |
| # 1. Ensure dependencies are installed and lockfile is consistent before dry run | |
| # 2. Simulate dependency updates | |
| # 3. Check for known security vulnerabilities | |
| # 4. Simulate deduplication | |
| set -euo pipefail | |
| pnpm install --frozen-lockfile |
| function Convert-PrefixToNetmask { | |
| param ( | |
| [Parameter(Mandatory = $true)] | |
| [int]$PrefixLength | |
| ) | |
| # Create a binary mask string with 1's for the prefix and pad with 0's | |
| $binaryMask = ("1" * $PrefixLength).PadRight(32, "0") | |
| $octets = @() | |
It understands files such as:
## global definitions
global:
debug: yes
verbose: no
debugging:
detailed: no
header: "debugging started"| # Reference https://stackoverflow.com/a/34407620/13287790 | |
| # Requires `jq` | |
| # $ echo -n "encode this" | jq -sRj @uri | |
| # encode%20this | |
| # MY_VAR=$(urlencode "encode this") | |
| echo -n "${1}" | jq -sRj @uri |
| # Clear all AWS related environment variables | |
| function awskill { | |
| Remove-Item -Path Env:AWS_DEFAULT_PROFILE -ErrorAction SilentlyContinue | |
| Remove-Item -Path Env:AWS_ACCESS_KEY_ID -ErrorAction SilentlyContinue | |
| Remove-Item -Path Env:AWS_SECRET_ACCESS_KEY -ErrorAction SilentlyContinue | |
| Remove-Item -Path Env:AWS_SECRET_KEY -ErrorAction SilentlyContinue | |
| Remove-Item -Path Env:AWS_SECURITY_TOKEN -ErrorAction SilentlyContinue | |
| Remove-Item -Path Env:AWS_SESSION_TOKEN -ErrorAction SilentlyContinue | |
| } |
| # https://github.com/pypa/pip/issues/4551 | |
| python -m pip freeze | ForEach-Object{$_.split('==')[0]} | ForEach-Object{python -m pip install --upgrade $_} |
| # from https://stackoverflow.com/a/33548037/7706917 | |
| # | |
| # Explanation: | |
| # --- | |
| # Switch to the main branch | |
| # $> git checkout main | |
| # Prune remote branches | |
| # $> git remote update origin --prune # Prune remote branches | |
| # Get a verbose output of all branches (git reference) | |
| # $> git branch -vv |
| This application is intended for the private use of its developer. Any unauthorized users which connect to this service should have no expectation of privacy or protection of their data. |