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
| type GateKeeper = { | |
| wait: () => Promise<void> | |
| pass: () => void | |
| } | |
| const createGateKeeper = (): GateKeeper => { | |
| let resolver!: () => void | |
| let promise!: Promise<void> | |
| const reset = () => { | |
| promise = new Promise<void>((res) => { | |
| resolver = res |
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://github.com/morethanwords/tweb | |
| * Copyright (C) 2019-2021 Eduard Kuzmenko | |
| * https://github.com/morethanwords/tweb/blob/master/LICENSE | |
| */ | |
| import noop from './noop'; | |
| export interface CancellablePromise<T> extends Promise<T> { | |
| resolve?: (value: T) => void, |
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
| # Install Homebrew | |
| /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
| eval "$(/opt/homebrew/bin/brew shellenv)" | |
| # Tap needed repos | |
| brew tap homebrew/cask-fonts | |
| # Install some stuff from Homebrew | |
| brew install --cask \ | |
| alex313031-thorium \ |
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
| @echo off | |
| setlocal | |
| :: Define the path to the directory | |
| :: This is my install directory. By default it's installed in C:\Program Files (x86)\Steam\steamapps\common\PUBG\TslGame\Content\Movies | |
| set "directory=C:\SteamLibrary\steamapps\common\PUBG\TslGame\Content\Movies" | |
| :: Define the paths to the files | |
| set "file1=%directory%\LicenseScreen.mp4" | |
| set "file2=%directory%\LoadingScreen.mp4" |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Colors</title> | |
| <style> | |
| body { |
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
| function Assign-VMGPUPartitionAdapter { | |
| param( | |
| [string]$VMName, | |
| [string]$GPUName, | |
| [decimal]$GPUResourceAllocationPercentage = 100 | |
| ) | |
| $PartitionableGPUList = Get-WmiObject -Class "Msvm_PartitionableGpu" -ComputerName $env:COMPUTERNAME -Namespace "ROOT\virtualization\v2" | |
| if ($GPUName -eq "AUTO") { | |
| $DevicePathName = $PartitionableGPUList.Name[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
| /* the buttons on the right of the file tabs */ | |
| [id="workbench.parts.editor"] .title-actions ul > li:has(:not(.codicon-close-dirty)) { | |
| display: none !important; | |
| } | |
| /* the buttons on the right of the window title */ | |
| .titlebar-right .monaco-toolbar { | |
| display: none !important; | |
| } |
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
| #!/bin/sh | |
| function forward_container() { | |
| docker run -it --rm \ | |
| -p $OUTSIDE_PORT:$INSIDE_PORT \ | |
| --network $NETWORK_NAME \ | |
| alpine/socat \ | |
| tcp-listen:$INSIDE_PORT,fork,reuseaddr tcp-connect:$CONTAINER_NAME:$INSIDE_PORT | |
| } |
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
| // Select the proper frame in devtools and run this script | |
| const nextPageButton = Array.from(document.querySelectorAll('mat-icon')).find((e) => e.innerHTML === 'chevron_right'); | |
| const getCurrentPageText = () => Array.from(document.querySelectorAll('reader-page')) | |
| .filter(e => e.checkVisibility()) | |
| .map((e) => e.textContent) | |
| .join(''); | |
| const isLastPage = () => nextPageButton.classList.contains('mat-button-disabled'); |
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
| (() => { | |
| const a = (prefix = '') => | |
| new Proxy( | |
| {}, | |
| { | |
| get(_, p) { | |
| const newPrefix = [prefix.toString(), p.toString()].join('.'); | |
| console.log('get: ', newPrefix); | |
| return a(newPrefix); | |
| }, |