this is for Amazon Linux 2
compiler etc
sudo dnf groupinstall -y "Development Tools"
minimal GnuPG dependencies
sudo dnf install -y libgpg-error-devel libgcrypt-devel libassuan-devel libksba-devel npth-devel
| // Source - https://stackoverflow.com/a/744609 | |
| // Posted by Deltax76, modified by community. See post 'Timeline' for change history | |
| // Retrieved 2026-09-14, License - CC BY-SA 2.5 | |
| // expanded by arielCo - queries all active displays; marks current mode | |
| using System; | |
| using System.Linq; | |
| using System.Runtime.InteropServices; | |
| using System.Windows.Forms; |
| DEVICE #1 | |
| Name: \\.\DISPLAY2 | |
| String: Intel(R) Iris(R) Xe Graphics | |
| 3840 × 2160 32 bits 30 Hz | |
| 3840 × 2160 32 bits 25 Hz | |
| 3840 × 2160 32 bits 24 Hz | |
| 3840 × 2160 32 bits 29 Hz | |
| 3840 × 2160 32 bits 23 Hz | |
| 2560 × 1440 32 bits 59 Hz <- CURRENT MODE | |
| 2560 × 1440 32 bits 60 Hz |
| function Get-PowerSourceChanges { | |
| [CmdletBinding()] | |
| param ( | |
| [int]$Hours = 6 | |
| ) | |
| $StartTime = (Get-Date).AddHours(-$Hours) | |
| $prevTime = Get-Date | |
| Get-WinEvent -FilterHashtable @{ | |
| LogName = 'System' |
| /* put this inside ui/ under User config folder (see Preferences > System) | |
| e.g. $env:appdata\inkscape\ui */ | |
| /* https://gitlab.com/inkscape/inkscape/-/work_items/3116 */ | |
| #InkRuler { font-size: 12px; } |
| import json | |
| import xml.etree.ElementTree as ET | |
| def _normalize_xpath(root_tag, xpath: str): | |
| if not xpath.startswith(".//"): | |
| return xpath | |
| rest = xpath[3:] | |
| if rest.startswith(root_tag + "//"): |
| def chkdigit_mod11(digits: list[int]|str) -> int: | |
| if isinstance(digits, str): | |
| _digits = list(map(int, list(digits))) | |
| elif isinstance(digits, list): | |
| _digits = digits | |
| else: | |
| raise ValueError(f"Wrong input type {type(digits)}") | |
| # 2, 3, 4, 5, 6, 7... | |
| weighted_sum = sum( d * (2 + i%6) for i, d in enumerate(reversed(_digits)) ) | |
| print(weighted_sum) |
| # UNTESTED | |
| class MultiLineFormatter(logging.Formatter): | |
| def format(self, record): | |
| # Save the original message | |
| original_msg = record.msg | |
| # Get the formatted message (this handles string interpolation) | |
| full_msg = record.getMessage() | |
| result = [] | |
| # Split by newline and format each line individually |
| $listener = [System.Net.Sockets.TcpListener]9999 | |
| $listener.Start() | |
| while ($true) { | |
| $client = $listener.AcceptTcpClient() | |
| $rEndpoint = $client.client.RemoteEndPoint | |
| $data = "" | |
| $stream = $client.GetStream() | |
| $buffer = New-Object System.Byte[] 1024 | |
| while ($client.Connected -and $stream.DataAvailable -and | |
| ($i = $stream.Read($buffer, 0, $buffer.Length)) -ne 0) { |
this is for Amazon Linux 2
compiler etc
sudo dnf groupinstall -y "Development Tools"
minimal GnuPG dependencies
sudo dnf install -y libgpg-error-devel libgcrypt-devel libassuan-devel libksba-devel npth-devel