This file contains 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
/** | |
* Asserts that a value is of a specific type. | |
* If the assertion fails, an error is thrown. | |
* | |
* @param value The value to type check (used only in type signature) | |
* @param checker A function that returns true if the value is of the expected type | |
* @param message Optional custom error message | |
* @throws Error if the checker returns false | |
*/ | |
export function assert<T>( |
This file contains 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
rclone mount ^ | |
--vfs-cache-mode full ^ | |
--vfs-cache-max-age 24h ^ | |
--vfs-cache-max-size 10G ^ | |
--buffer-size 256M ^ | |
--vfs-read-ahead 512M ^ | |
--vfs-read-chunk-size 32M ^ | |
--vfs-read-chunk-size-limit 256M ^ | |
--allow-other ^ | |
--dir-cache-time 24h ^ |
This file contains 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
import { onMounted, onUnmounted, Ref, ref, watch } from 'vue' | |
class ReactiveURL { | |
hash: string | |
host: string | |
hostname: string | |
href: string | |
pathname: string | |
port: string | |
protocol: string |
This file contains 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
param ( | |
[Parameter(Mandatory=$true)][string]$status | |
) | |
$isOnStart=$true | |
if ($status -eq "start") { | |
$isOnStart=$true | |
} elseif ($status -eq "end") { | |
$isOnStart=$false |
This file contains 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 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 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 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 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 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] |
NewerOlder