This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log(JSON.stringify(Array.from(document.querySelectorAll('.retableRow')).map(node => { | |
let rating | |
const up1 = node.querySelectorAll('[data-name="RateUpFill"]') | |
const up2 = node.querySelectorAll('[data-name="RateTwoThumbsFill"]') | |
// const down = node.querySelectorAll('[data-name="RateDownFill"]') | |
if (up1.length) { | |
rating = 1 | |
} else { | |
if (up2.length) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# make sure to set your own $apiKey beforehand. | |
function Hey-Gpt { | |
param([string] $Message, [switch]$Reset) | |
if ($Reset -or (-not $global:OpenAiChatMessages)) { | |
$global:OpenAiChatMessages = [System.Collections.ArrayList]::new() | |
} | |
$null = $global:OpenAiChatMessages.Add(@{ "role" = "user"; "content" = $message}) | |
$conversation = @{ "model"="gpt-3.5-turbo"; "messages" = $global:OpenAiChatMessages } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace playwrighttests; | |
// <PackageReference Include="PlaywrightSharp" Version="0.192.0" /> | |
public class UnitTest1 | |
{ | |
[Fact] | |
public async void Test1() | |
{ | |
var pw = await PlaywrightSharp.Playwright.CreateAsync(); | |
var br = await pw.Chromium.LaunchAsync(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################ | |
## ## | |
## READ FIRST ## | |
## ## | |
################################################ | |
# You can find the source of this document here: | |
# https://gist.github.com/SeidChr/60c54944920f3f5c47c4b2b79a552023 | |
# To learn more about .editorconfig see https://aka.ms/editorconfigdocs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://www.mobile.de/svc/my/parking-list/?lang=de | |
Get-Clipboard | ConvertFrom-Json |% items |? status -eq OK |% { | |
$now = Get-Date | |
$kmIndex = 1000000 | |
$priceIndex = 700000 | |
$ageIndex = 100 | |
$kmAIndex = 300000 | |
} { | |
$month,$year = $_.ad.attr.fr?.split("/") ?? 0,0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filter To-Select { | |
$object = $_ | |
$type = $_.GetType() | |
if ($type -in [hashtable],[pscustomobject]) { | |
$properties = ([pscustomobject] $_).psobject.properties | |
$propNames = $properties.name | |
if (-not ("Name" -in $propNames -and "Expression" -in $propNames)) { | |
$object = $properties | ForEach-Object { | |
@{ | |
Name = $_.name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# generate regex match groups from arrays | |
function ContGroup { | |
param([object[]]$Source, [int]$GroupSize) | |
0..($Source.Length-$GroupSize) |% { $Source | Select -Skip $_ -First $GroupSize | Join-String } | |
} | |
# $ ContGroup -Source (1..9 + 0) -GroupSize 4 | Join-String -Separator '|' | |
# 1234|2345|3456|4567|5678|6789|7890 | |
# $ ContGroup -Source ('a'..'z') -GroupSize 3 | Join-String -Separator '|' | |
# abc|bcd|cde|def|efg|fgh|ghi|hij|ijk|jkl|klm|lmn|mno|nop|opq|pqr|qrs|rst|stu|tuv|uvw|vwx|wxy|xyz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://www.mobile.de/svc/my/parking-list/?lang=de | |
$j | ConvertFrom-Json |% items |? status -eq OK |% { | |
$now = Get-Date | |
$kmIndex = 1000000 | |
$priceIndex = 700000 | |
$ageIndex = 100 | |
$kmAIndex = 300000 | |
} { | |
$month,$year = $_.ad.attr.fr?.split("/") ?? 0,0 | |
$km = [int][Regex]::Replace($_.ad.attr.ml, "[^\d]", '') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Schmutzbug // 20220519 Eifelkanal Discord |
NewerOlder