Skip to content

Instantly share code, notes, and snippets.

View hitorilabs's full-sized avatar
🍵

hitorilabs hitorilabs

🍵
View GitHub Profile
@hitorilabs
hitorilabs / GPU_HUNTER.sh
Last active February 2, 2024 17:27
GPU_HUNTER.sh
: ${SKU:='16531651'}
: ${USER_AGENT:='Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36'}
read -r SHIPPING_STATUS QUANTITY <<< $(curl -s "https://www.bestbuy.ca/ecomm-api/availability/products?accept=application%2Fvnd.bestbuy.standardproduct.v1%2Bjson&postalCode=${POSTAL_CODE}&skus=${SKU}"\
-H 'accept: application/json' \
-H 'user-agent: $USER_AGENT' \
--compressed | jq -r '.availabilities[0].shipping.status, .availabilities[0].shipping.quantityRemaining')
echo "$(date '+%Y-%m-%d %H:%M:%S') - status=$SHIPPING_STATUS | quantity=$QUANTITY" >> "output.log"
tail -n 15 output.log

Notes on installing M.2 PCIe Expansion Card

  1. boot into BIOS
  2. change PCIe link width configuration to x4x4x4x4
  3. partition drives
  4. create and start raid0 array
  5. make configuration persistent between reboots
  6. double check before committing too much data into the array

RPi 5 Shenanigans

power supply (?) issues - crashing when pulling >8W (i was running off a power bank)

you might want to consider getting the official one (5A/27W)


Temporarily limiting the CPU clock speed

Move the default Docker data-root

One situation that seems pretty common that is making a small partition for the root directory and allocated the rest of your memory for your home directory.

The default data-root is in /var/lib/docker/ - my solution is just to move all the files in this directory to /home with the same permissions and what not.


All you have to do is stop docker processes and the service sudo systemctl stop docker

@hitorilabs
hitorilabs / NCU.md
Last active November 15, 2024 03:25

Since I don't know how computers work... I'm always running into issues and for some reason I tend to never read the errors or logs.

NOT TODAY!

I just thought about it for a few moments, but I was trying to figure out how to get ncu to run (Nsight Compute CLI)

ncu --set full -o output python3 prof.py
import os
from pathlib import Path
import click
from PIL import Image
from mistralai import Mistral, OCRPageObject
api_key = os.environ["MISTRAL_API_KEY"]
client = Mistral(api_key=api_key)