Skip to content

Instantly share code, notes, and snippets.

View ajsya's full-sized avatar
:atom:
Inactive

ajsya

:atom:
Inactive
View GitHub Profile
@ajsya
ajsya / fan_control.sh
Created May 10, 2026 18:48
Bash script to adjust fan speed on linux
#!/bin/bash
TEMP=$(sensors | grep 'Core 0' | awk '{print $3}' | tr -d '.0 +°C')
if [ "$TEMP" -gt 85 ]; then
SPEED=5500
elif [ "$TEMP" -gt 80 ]; then
SPEED=5000
elif [ "$TEMP" -gt 75 ]; then
SPEED=4500
@ajsya
ajsya / Factors.py
Created March 1, 2025 21:03
Python script for Ti-84 Plus Ce Python Edition that finds factors of most numbers somewhat slowly
n = int(input("Factors of what? "))
print("Finding all factors of {0}...".format(n))
w = n
while w != 0:
x = int(n/w)
if x == n/w:
if x == 1:
@ajsya
ajsya / email.py
Created June 8, 2023 01:52
Google Bard Wrote This
import smtplib
def send_email(sender, recipient, subject, message):
# Create a secure SMTP connection
smtp = smtplib.SMTP('smtp.gmail.com', 587)
smtp.ehlo()
smtp.starttls()
# Login with your email and password
smtp.login(sender, 'Your Password')
@ajsya
ajsya / minutes-to-hours.py
Created February 10, 2023 02:01
Simple Python minutes to hours converter
mintutes = int(input("enter minutes"))
minutes1 = minutes%60
hours = minutes - minutes1
house /= 60
hours = int(hours)
print(str(hours) + "h" + str(minutes1))
@ajsya
ajsya / keep_alive.py
Last active April 21, 2026 05:40
24/7 repl.it hosting script
from flask import Flask
from threading import Thread
app = Flask('')
@app.route('/')
def home():
return "I'm alive"
def run():
app.run(host='0.0.0.0',port=8080)
def keep_alive():
t = Thread(target=run)
@ajsya
ajsya / bot.py
Last active May 5, 2021 02:38
Discord Bot Template
# Example Bot Template by SharkBaitBilly
import discord
from discord.ext import commands
bot = commands.Bot(command_prefix='.')
@bot.event
async def on_ready():
print('Logged in as')
@ajsya
ajsya / cheatsheet.txt
Created February 18, 2021 05:47
Discord Text Formatting Cheat Sheet
# Discord Text Formatting Cheat Sheet
_Italic_ / *Italic*
**Bold**
__Underline__
~~Strikethrough~~
||Spoiler||