Skip to content

Instantly share code, notes, and snippets.

View SteelPh0enix's full-sized avatar
🅱️
yeet

Wojciech Olech SteelPh0enix

🅱️
yeet
  • Project Orion
  • Poland
  • 06:32 (UTC +02:00)
  • X @steel_ph0enix
View GitHub Profile
@SteelPh0enix
SteelPh0enix / pull-hf-repo.py
Created September 24, 2024 20:13
clone huggingface repo and pull Git LFS files via HTTP
import argparse
import shutil
import subprocess
import os
from pathlib import Path
def parse_arguments() -> argparse.Namespace:
parser = argparse.ArgumentParser(
description="Clone a HuggingFace repository and download Git LFS files via HTTP, because fuck Git LFS."
@SteelPh0enix
SteelPh0enix / .zshrc
Created September 12, 2024 16:53
My ZSH init file (oh-my-zsh required)
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
@SteelPh0enix
SteelPh0enix / Microsoft.PowerShell_profile.ps1
Last active September 18, 2024 12:24
My PowerShell Profile script (put in $HOME/Documents/PowerShell)
Function list_as_list { eza -lh $args }
Function list_all_as_list { eza -alh $args }
Function remove_force { rm -Force $args }
Function edit_here { nvim . }
Function winget_install { winget install $args }
Function winget_update { winget upgrade -ru --pinned }
Function winget_search { winget search $args }
Function winget_remove { winget remove $args }
Function edit_config { nvim $profile }
@SteelPh0enix
SteelPh0enix / .wezterm.lua
Last active August 5, 2024 09:34
My WezTerm config
local wezterm = require('wezterm')
local config = wezterm.config_builder()
config.color_scheme = 'Kanagawa (Gogh)'
config.default_prog = { 'pwsh.exe' }
config.font = wezterm.font 'MonaspiceKr Nerd Font'
config.initial_cols = 120
config.initial_rows = 30
return config
@SteelPh0enix
SteelPh0enix / llama_cpp_utils.ps1
Last active September 19, 2024 21:17
llama.cpp PowerShell utils
# Collection of variables, aliases and Functions to work w/ llama.cpp
# Source to activate.
# HARDCODED VALUES - MAKE SURE TO TUNE THEM FOR YOUR SYSTEM!
$Env:ROCM_VERSION = "6.1.2"
$Env:USE_ROCM = 1
$Env:HIP_PLATFORM = "amd"
$Env:GPU_ARCHS = "gfx1100"
$Env:HSA_OVERRIDE_GFX_VERSION = "11.0.0"
$Env:TF_PYTHON_VERSION = "3.12"
@SteelPh0enix
SteelPh0enix / clean_rebuild_llama_cpp.bat
Last active September 19, 2024 21:19
Script for building llama.cpp under Windows for ROCm
REM execute via VS native tools command line prompt
REM make sure to clone the repo first, put this script next to the repo dir
REM this script is configured for building llama.cpp w/ ROCm support
REM for a system with Ryzen 9 5900X and RX 7900XT.
REM Unless you have the exact same setup, you may need to change some flags
REM and/or strings here.
set AMDGPU_TARGETS="gfx1100"
set HSA_OVERRIDE_GFX_VERSION="11.0.0"
set ROCM_VERSION="6.1.2"
@SteelPh0enix
SteelPh0enix / llama-cpp-utils.sh
Last active September 19, 2024 15:58
llama.cpp shell utils
#!/bin/zsh
# Collection of variables, aliases and functions to work w/ llama.cpp
# Source to activate.
# HARDCODED VALUES - MAKE SURE TO TUNE THEM FOR YOUR SYSTEM!
# These settings are for RX 7900 XT & latest Arch Linux
export ROCM_VERSION="6.0.2"
export USE_ROCM=1
export HIP_PLATFORM="amd"
#include <iostream>
#include <string>
template <typename T>
class Container {
public:
// Prevents creating nameless objects without value - assume that these are invalid.
Container() = delete;
#![no_std]
#![no_main]
use cortex_m_rt::entry;
use cortex_m_semihosting::hprintln;
use panic_semihosting as _;
use stm32f4::stm32f401::Peripherals;
fn init_board() -> Peripherals {
@SteelPh0enix
SteelPh0enix / init.lua
Last active February 2, 2023 17:14
My neovim init script
-- disable netrw (nvim-tree)
-- vim.g.loaded_netrw = 1
-- vim.g.loaded_netrwPlugin = 1
-- change shell
vim.o.shell = 'zsh -i'
-- Install packer
local install_path = vim.fn.stdpath 'data' .. '/site/pack/packer/start/packer.nvim'
local is_bootstrap = false