sudo apt remove openssh-server
sudo apt install openssh-serversudo nano /etc/ssh/sshd_config| $theme = powerlevel10k_rainbow | |
| $clink_config = "load(io.popen('oh-my-posh init cmd --config %POSH_THEMES_PATH%/$theme.omp.json'):read("*a"))()" | |
| sudo pwsh | |
| echo hi |
| >sudo nano /etc/wsl.conf | |
| [network] | |
| hostname = <new name> | |
| generateHosts = false | |
| >sudo nano /etc/hosts | |
| change all occurances of old host name to new | |
| usbipd list | |
| gsudo usbipd bind --busid <busid> | |
| usbipd attach --wsl --busid <busid> | |
| lsusb |
| Get-Service -Name sshd | Set-Service -StartupType Automatic | |
| Start-Service sshd | |
| ssh-keygen -t ed25519 | |
| # Make sure you're running as an Administrator. | |
| Get-Service ssh-agent | Set-Service -StartupType Automatic | |
| Start-Service ssh-agent | |
| # This should return a status of Running | |
| Get-Service ssh-agent |
| #include <iostream> | |
| #include <utility> | |
| using namespace std; | |
| enum class request_type { | |
| GET, | |
| POST, | |
| PUT, | |
| DELETE, | |
| OPTIONS, | |
| }; |
| (function () { | |
| const UTF8_SIGNIFICANT_BITS_SIZE = 7; | |
| const BITS_IN_BYTE = 8; | |
| globalThis.setChar = function (char, excludeCharacters) { | |
| if (typeof excludeCharacters === 'string') { | |
| return setChar(char, Array.prototype.map.call(excludeCharacters, c => c.charCodeAt(0))); | |
| } | |
| if (typeof char === 'string') { | |
| if (char.length !== 1) { |
| // http://burnignorance.com/vc-application-development-tips/hooking-a-message-box-in-vc/ | |
| HHOOK hMsgBoxHook; | |
| LRESULT CALLBACK MsgBoxProc(int nCode, WPARAM wParam, LPARAM lParam) | |
| { | |
| TCHAR ach[140]; | |
| HWND hwnd; | |
| HWND YES; | |
| HWND NO; | |
| HWND CANCEL; |
| type Dec<Length extends number, Acc extends never[] = []> = | |
| [never, ...Acc]['length'] extends Length ? Acc['length'] : | |
| Dec<Length, [never, ...Acc]>; | |
| type MakeRange<TMin extends number, TMax extends number, Acc extends number = never> = | |
| TMax extends TMin ? TMax | Acc | |
| : MakeRange<TMin, Dec<TMax>, TMax | Acc>; | |
| type TupleBaseType = readonly any[] & { length: MakeRange<1,10> } | |
| /** | |
| * generate this code with: | |
| * ======================= |
| import { Func } from "@rhombus-toolkit/func"; | |
| type Func<Args extends any[], Result = void> = (...args: Args) => Result; | |
| type AnyRecord = Record<string|symbol, any>; | |
| type AnyFunction = (...args: any[]) => any; | |
| type MakeBuilder<T extends AnyRecord> = | |
| T extends infer a extends AnyRecord | infer b extends AnyRecord ? ObjectBuilder<a> | ObjectBuilder<b> : ObjectBuilder<T>; |