Skip to content

Instantly share code, notes, and snippets.

View TreyBastian's full-sized avatar

Trey TreyBastian

View GitHub Profile
@TreyBastian
TreyBastian / .wezterm.lua
Created May 22, 2024 08:35
My Wezterm config
local wezterm = require 'wezterm'
local config = wezterm.config_builder()
config.color_scheme = 'Batman'
config.wsl_domains = {
{
name = 'WSL:Ubuntu',
distribution = 'Ubuntu',
},
@TreyBastian
TreyBastian / outlands_profile_mapper.ps1
Last active September 9, 2022 08:30
UO Outlands Network Drive Profile Mapper
# Copyright 2022 Trey Bastian
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR T
// Treys autoexec
// Last Updated 31 Dec 2017
// Rates
rate "786432"
cl_cmdrate "128"
cl_updaterate "128"
cl_interp "0.0"
cl_interp_ratio "1"
cl_interpolate "1"
@TreyBastian
TreyBastian / saccades.go
Created March 15, 2016 16:50
Calculate Saccades
func calculateVelocities(data []float64, timeData []int64) []float64 {
var result = make([]float64, 0)
for d := range data {
// first 2 points of data set will always be NAN as +2 and -2 don't exist
if d < 2 || d >= len(data)-2 {
result = append(result, math.NaN())
} else {
//calculate delta time over the range - d+2 - d-2 should cover the whole time range
deltaTime := timeData[d+2] - timeData[d-2]
x := (data[d+2] + data[d+1] - data[d-1] - data[d-2]) / (6 * float64(deltaTime))