Skip to content

Instantly share code, notes, and snippets.

View TylerCode's full-sized avatar
:octocat:
Probably making something

Tyler C TylerCode

:octocat:
Probably making something
View GitHub Profile
@TylerCode
TylerCode / wayland-egpu.md
Last active March 26, 2024 21:04
Getting an eGPU working on Wayland

Another day, another eGPU documentation

First another little disclaimer; this guide partially works for me but it might not work for you. eGPU's seem to be an unwanted stepchild in terms of support. I wish anyone luck!

Also for some expectation setting, hotswap isn't a thing. I don't think that Linux will ever have hotswap eGPU support so if you want to plug or unplug the GPU, power down first. Being fair, this doesn't really work great on Windows either.

I also still have issues with the Ethernet port on the core X, and still have issues with all but 1 USB port (top left). Happy for advice on any fixes.

My Setup

@TylerCode
TylerCode / login.cshtml.cs
Created January 9, 2024 20:46
Login page for Auth0
using Microsoft.AspNetCore.Authentication;
using Auth0.AspNetCore.Authentication;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace MyApplication.Pages
{
public class LoginModel : PageModel
{
public async Task OnGet(string redirectUri, string? invitation = null, string? organization = null)
{
@TylerCode
TylerCode / speedtest.py
Created December 22, 2023 17:39
Speedtesting on the reg
import csv
import subprocess
from datetime import datetime
import time
def run_speedtest():
# Run speedtest-cli and capture output
process = subprocess.Popen(['speedtest-cli', '--csv'], stdout=subprocess.PIPE)
output, error = process.communicate()
@TylerCode
TylerCode / zorin-egpu.md
Last active January 10, 2024 00:14
Getting an eGPU Working on Zorin OS 17

eGPU on Zorin OS 17

First a little disclaimer; this guide partially works for me but it might not work for you. eGPU's seem to be one of the most fragile setups imagineable from a software standpoint. I wish anyone luck!

Also for some expectation setting, hotswap isn't a thing. I don't think that Linux will ever have hotswap eGPU support so if you want to plug or unplug the GPU, power down first.

I also still have issues with the Ethernet port on the core X, still have issues with all but 1 USB port (top left), still have issues running the laptop WITHOUT the core x connected. Happy for advice on any fixes.

My Setup

@TylerCode
TylerCode / BaldursSave.py
Last active August 12, 2023 17:21
Run this with BG to save every 10 min
import psutil
import time
from pynput.keyboard import Key, Controller
time.sleep(10)
def check_if_process_running(process_keywords):
try:
# Check every process cause this wasn't working.... idk why
for proc in psutil.process_iter():
@TylerCode
TylerCode / Unity_LOWREZJAM.md
Last active February 21, 2024 08:11
Pixel Perfect, Low Resolution, WITH Post Processing. Unity 2021.3, 2022.3, and 2023.1

Intro

It's that time of year again. Time for the #LOWREZJAM!!!

Almost every year so far, I've created a guide to getting 64x64 resolution working as natively as possible so this year is of course, no exception. This is not for absolute beginners but if you've done some tutorials for unity then you should be fine here.

This guide is going to go beyond just using the default pixel perfect camera and such and the goal is to have Post Processing, UI, and the normal artwork ALL being forced into the 64x64 resolution. I want to warn you, this is janky, but it DOES accomplish those goals. Every time I've tried to do it in a more clean fashion, I end up with UI that is affected by post processing, or UI that isn't interactable, or some edge case in the Pixel Perfect Camera component.

Last thing, if you don't care about post processing, this is actually much, MUCH easier, you can scroll to the end for that guide and **if you're just making a 2d game with no post processin

@TylerCode
TylerCode / LocalGravity.cs
Last active April 14, 2018 13:34
local gravity
using UnityEngine;
public class LocalGravity : MonoBehaviour
{
public Transform m_GravityCenter;
private Rigidbody m_RigidBody;
void Start()
{