Skip to content

Instantly share code, notes, and snippets.

View Haaroon's full-sized avatar

Haaroon Y Haaroon

View GitHub Profile
@Haaroon
Haaroon / github_workflow.yml
Created July 19, 2023 13:49
A Github workflow extract showing how to bypass the Github Actions Disk Space Limit on Windows to allow you to build larger projects. Here we want to build polars on rust, but the windows default machie runs out of space. so we checkout the files onto the c drive and run everything from there.
windows-rust-test:
if: ${{ !inputs.skip_tests }}
name: Windows Rust Tests
runs-on: windows-latest
steps:
- run : mkdir C:\raphtory
- name: Checkout code
uses: actions/checkout@v3
- run : Xcopy "D:\a\Raphtory\Raphtory" "C:\raphtory" /E/I/H/Y
- name: Set up cargo cache
@Haaroon
Haaroon / swap.sh
Created May 31, 2023 13:32
In MacOSX swap two monitors around. you need displayplacer app
displayplacer "id:91296285-CF05-B8BC-5953-2A2A2B4EA23B res:1920x1080 hz:60 color_depth:8 scaling:off origin:(0,0) degree:0" "id:31E3E4DA-3646-DA8F-44BA-A923FBB7CB98 res:1920x1080 hz:60 color_depth:8 scaling:off origin:(-1920,0) degree:0"
@Haaroon
Haaroon / Direction.rs
Created April 12, 2023 15:55
GRAVEYARD FOR MY DIRECTION FILE
use docbrown::core::Direction;
use pyo3::{pyclass, PyRef, PyRefMut};
use pyo3::{PyObject, Python};
use std::fmt;
#[pyclass(name = "Direction")]
#[derive(Clone)]
pub enum PyDirection {
BOTH,
IN,
@Haaroon
Haaroon / one_pace_renamer.py
Last active January 14, 2023 12:57
rename downloaded one pace files into proper SXXEXX format
import os
def run(season):
files = sorted([file for file in os.listdir('.') if file.startswith("One.Piece")])
for i, file in enumerate(files, 1):
new_name = f"One.Piece.S{season}E{str(i).zfill(2)}.mkv"
print(f"{file} -> {new_name}")
if input("Do You Want To Continue? [y/n]") == "y":
for i, file in enumerate(files, 1):
new_name = f"One.Piece.S{season}E{str(i).zfill(2)}.mkv"
@Haaroon
Haaroon / etherScanScraper.ipynb
Created January 5, 2023 18:43
etherscan scraper but you bring your own cookies
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Haaroon
Haaroon / fix.md
Created December 5, 2022 09:47
Fixing GLIBC_2.34 GLIBC_2.35 GLIBC_2.33 in Github Workflows

How to fix the error below

The GLIBC_2.3 not found error occuring in github workflows.

python: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by python)
python: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.35' not found (required by /__t/Python/3.9.15/x64/lib/libpython3.9.so.1.0)
python: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /__t/Python/3.9.15/x64/lib/libpython3.9.so.1.0)
python: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /__t/Python/3.9.15/x64/lib/libpython3.9.so.1.0)
python: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /__t/Python/3.9.15/x64/lib/libpython3.9.so.1.0)
@Haaroon
Haaroon / fallout new vegas steam deck mod guide.md
Last active April 18, 2024 19:28
how to install fallout new vegas on steam deck and install mods
@Haaroon
Haaroon / script.ahk
Created April 24, 2022 17:14
autohotkey script to automate clicking slow download on nexusmods when using wabbajack you just need to make a image of the button, save it and then replace the destination of the iamge on line 9
F1::
StopLoop := False
Loop,
{
ImageSearch, FoundX, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, *10 C:\Users\Haaroon\Documents\snip.png
MouseClick, left, %foundx%, %foundy%
@Haaroon
Haaroon / type gist.scala
Created January 18, 2022 18:11
type gist
sealed trait Callable[T] {
def call(): T
}
object Caller {
def call[C, A <: Callable[C]](callable: A): C = {
callable.call()
}
}
@Haaroon
Haaroon / guide.txt
Created December 30, 2021 20:12
How to Remap buttons on your Android TV remote e.g. Google Play and Netflix buttons
Just now·2 min read
Modern TVs are now shipped with Operating Systems like Android TV, which bring about a large step forwards.
Unfortunately, these devices such as the Sony XH950 TV come with old-school remotes, e.g. Sony RMF-TX500E, pictured below. These come with pre-programmed “AD-buttons” that are shortcuts to things like “Google Play” and “Netflix”.
Remote with yucky ad buttons
What if you wanted to change them? Instead of Netflix open up HDMI for my PC, instead of Google Play open up YouTube. Here is a quick barebones guide on how you can. I say barebones, because this guide took me 5 minutes to write and requires that you already have advanced knowledge in Android programming. This is not a step-by-step guide per say.
For this I downloaded the Button Mapper app on the Android TV. https://play.google.com/store/apps/details?id=flar2.homebutton Using this you can easily change the buttons. Just install the app, enable accessibility access and voila. Then add the buttons via the “Add Buttons” Menu and