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
| ``` | |
| msedge.exe --user-data-dir="C:/EdgeDebug" --disable-web-security | |
| ``` | |
| ``` | |
| let imgurls = [...document.querySelectorAll("div#main-photo-gallery div.grid-item img[src^='https://marathonfotothumbs.blob.core.windows.net']")].map(i => i.src); | |
| ``` | |
| ``` | |
| /** |
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
| { | |
| "openapi": "3.0.1", | |
| "info": { | |
| "title": "Echo API", | |
| "version": "1.0" | |
| }, | |
| "servers": [ | |
| { | |
| "url": "https://beejapim.azure-api.net/echo" | |
| } |
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
| // Green Attic Quotes | |
| copy( | |
| [...document.querySelectorAll(".MuiGrid-container")] | |
| .map(r => [...r.querySelectorAll(".MuiGrid-item")].map(c => c.innerText.replace(/[\r\n]+/g, ' ').trim())) | |
| .map(row => row.join('\t')) | |
| .join('\n') | |
| ) |
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
| *.appx | |
| *.msixbundle | |
| *.wsb |
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
| <ul> | |
| {[1, 2, 3, 4, 5].map(i => <li>{i}</li>)} | |
| </ul> |
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
| # C# syntax works under both pwsh core and legacy Windows Powershell which is capped at C# 5.0 and .Net Framework vs dotnet core | |
| Add-Type @" | |
| using System; | |
| using System.IO; | |
| public static class BigCsvSplitter | |
| { | |
| public static void Run() |
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.nuget.org/packages/Microsoft.Net.Compilers.Toolset | |
| md cs-repl | cd | |
| nuget install Microsoft.Net.Compilers.Toolset | |
| # run a CS script, a useful alternative to PowerShell itself | |
| echo 'Console.WriteLine("hello");' > script.csx | |
| . (gci -recurse csi.exe).FullName script.csx | |
| # run in REPL mode |
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
| # base64 to hex | |
| echo -n AwCYPg== | base64 -d | xxd -ps | |
| # hex to base64 | |
| echo -n 0300983e | xxd -r -p | base64 |
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
| dest.cs | |
| dest/ | |
| save.ps1 | |
| source.cs | |
| source.dll |
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
| //helper function | |
| function groupBy(objectArray, property) { | |
| return objectArray.reduce((acc, obj) => { | |
| const key = obj[property]; | |
| if (!acc[key]) { | |
| acc[key] = []; | |
| } | |
| // Add object to list for given key's value | |
| acc[key].push(obj); | |
| return acc; |
NewerOlder