I hereby claim:
- I am lkraider on github.
- I am lkraider (https://keybase.io/lkraider) on keybase.
- I have a public key ASCtuhrH3CmFPAr8qYr8m8Q0gFEV8h9kXkKNBplfdp_LrAo
To claim this, I am signing this object:
| import re | |
| import sys | |
| import json | |
| from datetime import timedelta | |
| # --- Helper functions for time conversion --- # | |
| def srt_time_to_seconds(srt_time: str) -> float: | |
| """ | |
| Convert SRT time (HH:MM:SS,ms) to seconds. |
| def creds = com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials( | |
| com.cloudbees.plugins.credentials.common.StandardUsernameCredentials.class, | |
| Jenkins.instance, | |
| null, | |
| null | |
| ) | |
| for(c in creds) { | |
| if (c instanceof com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl){ | |
| println(String.format("id=%s desc=%s user=%s pass=%s\n", c.id, c.description, c.username, c.password)) |
| ---------------------------- MODULE KafkaRoller ---------------------------- | |
| EXTENDS Integers, Sequences, FiniteSets | |
| CONSTANTS | |
| ControllerNodes, \* Set of nodes with the controller role | |
| BrokerNodes, \* Set of nodes with the broker role | |
| CombinedNodes, \* Set of nodes with both controller and broker roles | |
| MaxRestartAttempts, \* Maximum number of restart attempts allowed per node | |
| MaxRetries \* Maximum number of retries allowed per node |
| import os | |
| from datetime import datetime | |
| def sync_timestamps(backup_folder, destination_folder, dry_run=False): | |
| # Loop through the files in the destination folder | |
| for file_name in os.listdir(destination_folder): | |
| destination_file_path = os.path.join(destination_folder, file_name) | |
| destination_modified_time = os.path.getmtime(destination_file_path) | |
| # Check if there is a corresponding file in the backup folder with the same name |
| # parsed report from: https://gist.github.com/lkraider/729223f16025c1ff6223536896465e36 | |
| # using online tool: http://eleccelerator.com/usbdescreqparser/ | |
| 0x05, 0x86, // Usage Page (Power Pages) | |
| 0x09, 0x04, // Usage (0x04) | |
| 0xA1, 0x01, // Collection (Application) | |
| 0x05, 0x84, // Usage Page (Power Pages) | |
| 0x09, 0x1E, // Usage (0x1E) | |
| 0xA1, 0x00, // Collection (Physical) | |
| 0x85, 0x01, // Report ID (1) | |
| 0x09, 0x1F, // Usage (0x1F) |
| def decode(msg): | |
| text = [] | |
| for i in range(0, len(msg), 2): | |
| text.append(unrot(msg[i: i + 2])) | |
| return str.join('', text) | |
| def unrot(pair, key=ord('x')): | |
| offset = 0 | |
| for c in 'cdefgh': |
| ~# /lib/nut/nutdrv_qx -a nsys1 -DDDDD -x vendorid=0001 | |
| Network UPS Tools - Generic Q* USB/Serial driver 0.28 (2.7.4) | |
| USB communication driver 0.33 | |
| 0.000000 send_to_all: SETINFO driver.parameter.vendorid "0001" | |
| 0.000033 debug level is '5' | |
| 0.000975 upsdrv_initups... | |
| 0.014797 Checking device (1D6B/0003) (002/001) | |
| 0.030369 - VendorID: 1d6b | |
| 0.030398 - ProductID: 0003 | |
| 0.030408 - Manufacturer: unknown |
| ~# /lib/nut/blazer_usb -a nsys1 -DDDDD -x vendorid=0001 | |
| Network UPS Tools - Megatec/Q1 protocol USB driver 0.12 (2.7.4) | |
| 0.000000 send_to_all: SETINFO driver.parameter.vendorid "0001" | |
| 0.000038 debug level is '5' | |
| 0.021080 Checking device (1D6B/0003) (002/001) | |
| 0.036745 - VendorID: 1d6b | |
| 0.036778 - ProductID: 0003 | |
| 0.036819 - Manufacturer: unknown | |
| 0.036842 - Product: unknown | |
| 0.036856 - Serial Number: unknown |
| ~# /lib/nut/usbhid-ups -a nsys1 -DDDDD -x vendorid=0001 -x explore | |
| Network UPS Tools - Generic HID driver 0.41 (2.7.4) | |
| USB communication driver 0.33 | |
| 0.000000 send_to_all: SETINFO driver.parameter.vendorid "0001" | |
| 0.000042 send_to_all: SETINFO driver.flag.explore "enabled" | |
| 0.000061 debug level is '5' | |
| 0.001022 upsdrv_initups... | |
| 0.017350 Checking device (1D6B/0003) (002/001) | |
| 0.037392 - VendorID: 1d6b | |
| 0.037425 - ProductID: 0003 |
I hereby claim:
To claim this, I am signing this object: