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
| soundcard_sink_id() { | |
| wpctl status | grep "Scarlett Solo" | head -n2 | tail -n1 | grep -oP "\d+\." | head -n1 | grep -oP "\d+" | |
| } | |
| notify_volume_change() { | |
| SINK_ID="$1" | |
| NEW_VOLUME_MSG="$(wpctl get-volume $SINK_ID)" | |
| # Trim: "Volume: 0.12 [MUTED]" -> "0.12 [MUTED]" | |
| NEW_VOLUME_SCALAR="${NEW_VOLUME_MSG#*: }" |
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
| .data | |
| greeting BYTE "Hello, World!", 10 | |
| .code | |
| extern GetStdHandle:proc | |
| extern WriteConsoleA:proc | |
| helloworld proc | |
| sub rsp, 28h ; 32 bytes of shadow space + 8 bytes for the 5th arg of WriteConsoleA |
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://stackoverflow.com/questions/10365394/change-windows-font-size-dpi-in-powershell/68215326#68215326 | |
| function Set-Scaling { | |
| # Posted by IanXue-MSFT on | |
| # https://learn.microsoft.com/en-us/answers/questions/197944/batch-file-or-tool-like-powertoy-to-change-the-res.html | |
| # $scaling = 0 : 100% (default) | |
| # $scaling = 1 : 125% | |
| # $scaling = 2 : 150% | |
| # $scaling = 3 : 175% | |
| param($scaling) | |
| $source = @' |
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
| ::SnowfallEvents <- { | |
| function LowerElevatorByDeltaTime(dt) | |
| { | |
| local elevator = Entities.FindByName(null, "elevator"); | |
| Assert(elevator.IsValid()); | |
| local elevatorOrigin = elevator.GetOrigin(); | |
| // The assumed elevator brush world coordinate after the sequence. | |
| const finalElevatorHeight = -160; |
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
| ## | |
| # A script to split simple, architectural geometry into convex pieces. | |
| # | |
| # This script makes use of Blender's built-in "Split Concave Faces" clean-up | |
| # algorithm to break-up the faces of an object into convex pieces. The script | |
| # attempts to identify all the edges that represent convex boundaries, and then | |
| # it splits objects up along those edges. Each resulting piece is then made into | |
| # a closed object by converting it into a convex hull. | |
| # | |
| # Be sure to select the object you wish the split into convex pieces before |
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
| #!/usr/bin/python3 | |
| import os | |
| import struct | |
| import sys | |
| def get_phys_lump_size(bsp_path: os.PathLike) -> int: | |
| """Read the physics lump size from a Source engine BSP""" | |
| lump_phys = 29 |
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
| #include <sourcemod> | |
| #include <dhooks> | |
| #pragma semicolon 1 | |
| #pragma newdecls required | |
| static int _numAdds = 0; | |
| public void OnPluginStart() | |
| { |
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
| # Assuming deps installed as per: https://github.com/NeotokyoRebuild/neo?tab=readme-ov-file#linux-prerequisite---steam-runtime-3-sniper-container | |
| # Assuming pwd of NT;RE code repo root dir. | |
| # Following the "buildenv" command, enter the following commands inside the container: | |
| # cd /root/neo/src | |
| # cmake --preset linux-debug # or linux-release | |
| # cmake --build --preset linux-debug # or linux-release | |
| alias buildenv='sudo docker run -v .:/root/neo/ --rm -it --entrypoint / | |
| │ bin/bash registry.gitlab.steamos.cloud/steamrt/sniper/sdk' |
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
| #!/usr/bin/env python3 | |
| import os | |
| from pathlib import Path | |
| import subprocess | |
| # Without file extension | |
| PLUGIN = "nt_spec_quicktarget" | |
| # Assuming code lives in ./scripting of this | |
| REPO_NAME = "sourcemod-nt-spec-quicktarget" |
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
| #include <sourcemod> | |
| #include <sdktools> | |
| #pragma semicolon 1 | |
| #pragma newdecls required | |
| // SemVer 2.0.0 | |
| #define MEMTOOLS_VERSION_MAJOR 0 | |
| #define MEMTOOLS_VERSION_MINOR 1 | |
| #define MEMTOOLS_VERSION_PATCH 0 |
NewerOlder