Skip to content

Instantly share code, notes, and snippets.

View TylerCode's full-sized avatar
:octocat:
Probably making something, I have too many repos...

Tyler C TylerCode

:octocat:
Probably making something, I have too many repos...
View GitHub Profile
@TylerCode
TylerCode / install_xcpguest.sh
Last active November 25, 2024 21:50
installs the guest tools on Ubuntu for XCP-NG
#!/bin/bash
# Check if script is run as root
if [ "$EUID" -ne 0 ]; then
echo "Please run as root"
exit 1
fi
# Common CD/DVD device locations
DEVICE_LOCATIONS=(
@TylerCode
TylerCode / plant_freeze.py
Created October 8, 2024 15:57
Plant Freeze Text! - Get a text message when your plants hit freezing temperatures.
import requests
import os
from twilio.rest import Client
from datetime import datetime
# OpenWeatherMap API configuration
OWM_API_KEY = "YOUR_OPENWEATHERMAP_API_KEY"
ZIP_CODE = "YOUR US ZIP CODE"
COUNTRY_CODE = "US"

Test text

@TylerCode
TylerCode / install_unity_fedora.sh
Created May 25, 2024 16:34
Install script for installing Unity Hub on Fedora Linux
#Use this to install unity on Fedora
sudo dnf install openssl openssl-libs GConf2
sudo sh -c 'echo -e "[unityhub]\nname=Unity Hub\nbaseurl=https://hub.unity3d.com/linux/repos/rpm/stable\nenabled=1\ngpgcheck=1\ngpgkey=https://hub.unity3d.com/linux/repos/rpm/stable/repodata/repomd.xml.key\nrepo_gpgcheck=1" > /etc/yum.repos.d/unityhub.repo'
# For beta hub, use this
#sudo sh -c 'echo -e "[unityhub-beta]\nname=Unity Hub Beta\nbaseurl=https://hub.unity3d.com/linux/repos/rpm/unstable\nenabled=1\ngpgcheck=1\ngpgkey=https://hub.unity3d.com/linux/repos/rpm/unstable/repodata/repomd.xml.key\nrepo_gpgcheck=1" > /etc/yum.repos.d/unityhub_beta.repo'
sudo dnf check-update
sudo dnf install unityhub
@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 August 5, 2024 17:17
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 maintained 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 goes beyond just using the default pixel perfect camera and the goal is to have Post Processing, UI, and the normal artwork ALL being forced into the 64x64 resolution. 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 making a 2d game with no post processing/lighting, I recommend that instead!