Skip to content

Instantly share code, notes, and snippets.

View SteelPh0enix's full-sized avatar
🅱️
yeet

Wojciech Olech SteelPh0enix

🅱️
yeet
View GitHub Profile
@SteelPh0enix
SteelPh0enix / Microsoft.PowerShell_profile.ps1
Last active June 28, 2024 21:01
My PowerShell Profile script (put in $HOME/Documents/PowerShell)
Function list_as_list { eza -lh }
Function list_all_as_list { eza -alh }
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
Created June 28, 2024 20:46
My WezTerm config
local wezterm = require('wezterm')
local config = wezterm.config_builder()
config.color_scheme = 'cyberpunk'
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 June 26, 2024 12:40
llama.cpp PowerShell utils
# Collection of variables, aliases and Functions to work w/ llama.cpp
# Source to activate.
# DO NOT source in VS command prompt for building llama.cpp, use this for building:
# https://gist.github.com/SteelPh0enix/8651ed5a6ea571b1cd11b8c9fa47ac47
# HARDCODED VALUES - MAKE SURE TO TUNE THEM FOR YOUR SYSTEM!
$Env:ROCM_VERSION = "5.7.1"
$Env:USE_ROCM = 1
$Env:HIP_PLATFORM = "amd"
$Env:GPU_ARCHS = "gfx1100"
@SteelPh0enix
SteelPh0enix / clean_rebuild_llama_cpp.bat
Last active June 27, 2024 09:04
Script for building llama.cpp under Windows for ROCm
REM execute via VS native tools cmd prompt
REM make sure to clone the repo first, put this script next to the repo dir
cd llama.cpp
git clean -xddf
git pull
git submodule update --recursive
git lfs pull
set ROCM_PATH=%HIP_PATH%
set CMAKE_MODULE_PATH=%HIP_PATH%cmake
@SteelPh0enix
SteelPh0enix / llama-cpp-utils.sh
Last active June 28, 2024 16:21
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!
export ROCM_VERSION="6.0.2"
export USE_ROCM=1
export HIP_PLATFORM="amd"
export GPU_ARCHS="gfx1100"
#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
@SteelPh0enix
SteelPh0enix / generate_wav.cpp
Last active November 12, 2022 22:23
Generate simple WAV audio file in C++
#include <algorithm>
#include <array>
#include <cinttypes>
#include <cmath>
#include <fstream>
#include <iostream>
#include <string_view>
#include <vector>
#include "wav_header.hpp"
@SteelPh0enix
SteelPh0enix / .vimrc
Created October 11, 2022 11:29
My current .vimrc file
" vimrc based on https://github.com/amix/vimrc/blob/master/vimrcs/basic.vim
" written by SteelPh0enix
" Set how many lines of history are remembered
set history=500
" Enable filetype plugins
filetype plugin on
filetype indent on