Skip to content

Instantly share code, notes, and snippets.

View Frosthaven's full-sized avatar
Developed with love and fury

Shane Stanley Frosthaven

Developed with love and fury
View GitHub Profile
# ABOUT ------------------------------------------------------------------------
# ------------------------------------------------------------------------------
# AUTHOR: Frosthaven
# DISCORD: frosthaven
# DESCRIPTION: This is a powershell script that accomplishes the following:
# 1. Launches a process
# 2. Sets the affinity of the process to include or exclude specific cpu cores
# 3. Optionally monitors the process for hangs and kills it if it hangs
# 4. Optionally restarts the process if it hangs
@Frosthaven
Frosthaven / command-sf.ps1
Created February 21, 2025 12:59
[S]earch [F]iles (sf) command - leveraging fzf and bat
# sf [s]earch [f]iles command (sf)
# this will use the output of the fzf command to open the file in nvim. You can
# - change the editor launch command to whatever you want.
# - see: https://github.com/junegunn/fzf
# - see: https://github.com/sharkdp/bat
function sf {
$file = fzf --preview "bat --color=always {}" --preview-window=right:50%:wrap --height 50% --border --prompt="Search Files: " --query="$args"
if ($file) {
nvim $file # or with your editor of choice
}