Note
This no longer works in browser!
Note
This no longer works if you're alone in vc! Somebody else has to join you!
How to use this script:
- Accept the quest under User Settings -> Gift Inventory
type Category = { | |
title: string; | |
items: Array<{ name: string }>; | |
}; | |
type Config = { | |
categories: Record<string, Category>; | |
}; | |
function isCategory(obj: unknown): obj is Category { |
>>> from enum import EnumMeta, Enum | |
>>> Color3 = EnumMeta('Color3', (Enum,), (_ := EnumMeta.__prepare__( | |
... 'Color3', (Enum,),)) and any(map(_.__setitem__, *(zip(*{ | |
... 'RED': 1, | |
... 'GREEN': 2, | |
... 'BLUE': 3, | |
... }.items())))) or _ | |
... ) | |
>>> print(Color3(1)) # or without print(): <Color3.RED: 1> | |
Color3.RED |
""" | |
Wordwrap text to a specified line length. | |
Takes a string or file-like object as input and returns the wrapped text. | |
""" | |
import re | |
from typing import IO, Union | |
def wordwrap(text_or_file: Union[str, IO], max_line_length: int = 80) -> str: |
def StrToBrf(v: str) -> str: | |
result = [] | |
current = 0 | |
for ch in v: | |
target = ord(ch) | |
diff = target - current | |
if diff > 0: | |
result.append('+' * diff) | |
elif diff < 0: | |
result.append('-' * abs(diff)) |
set interface INTERFACE_AX | |
set streams 4 | |
set bandwidth BANDWIDTH_ADAPT | |
set vstaCount 1 | |
set vstaConfig {{"interface_": "$interface", "txAtten": 0, "streams": $streams, "bandwidth": "$bandwidth"}} | |
set vstaConfig [subst -nocommands -nobackslashes $vstaConfig] | |
set vsta_array [lrepeat $vstaCount $vstaConfig] | |
set vsta_array [join $vsta_array ", "] | |
puts $vsta_array |
""" | |
WordBomb.py | |
~~~~~~~~~~~ | |
A simple script to open notepad and type words that contain a given letter. | |
Closes notepad when user wants to stop, without saving the file. | |
Requirements: | |
- Python 3.8 or higher | |
- pyautogui (python3 -m pip install pyautogui) |
Add-Type -assemblyName System.Windows.Forms;$a=@(1..100);$chars="abc";while($true){$c=[System.Windows.Forms.Cursor]::Position;Start-Sleep -Seconds 5;if($c -eq $([System.Windows.Forms.Cursor]::Position)){$randomX=$a|Get-Random;$randomY=$a|Get-Random;$newPosition=New-Object System.Drawing.Point($randomX,$randomY);[System.Windows.Forms.Cursor]::Position=$newPosition;$randomChar=($chars.ToCharArray()|Get-Random -Count $chars.Length)-join"";[System.Windows.Forms.SendKeys]::SendWait($randomChar);$backspaces="{0}"-f('{BACKSPACE}'*$randomChar.Length);[System.Windows.Forms.SendKeys]::SendWait($backspaces)}} |
/* eslint-disable @typescript-eslint/no-var-requires */ | |
/** | |
* @fileoverview | |
* This script is used to fix the import paths in the JS files in the dist directory. | |
* It is used to fix the import paths in the JS files after the build process for tsc. | |
* That way you can then run `node dist/index.js` and the imports will work as expected! | |
* It is recursive, so it will fix all JS files in the directory and its subdirectories. | |
* e.g. | |
* import { someFunction } from '../../someModule'; | |
* will be replaced with |
find . -print | sed -e "s;[^/]*/;|____;g;s;____|; |;g" |