Skip to content

Instantly share code, notes, and snippets.

View ntropy83's full-sized avatar

ntropy83

View GitHub Profile
#!/bin/sh
# Install the container
# docker run -d --gpus=all -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama
cleanup()
{
echo "Caught Signal ... cleaning up."
docker container stop ollama
exit 1
@ntropy83
ntropy83 / .conkyrc_nvidia.sh
Created February 17, 2024 20:22
.conkyrc_nvidia.sh
#!/bin/sh
if [ "$(cat /sys/class/drm/card0/device/power_state)" == "D0" ]
then
echo "- Usage: G $(nvidia-smi -q | grep 'Gpu' | cut -c '45-49'), M $(nvidia-smi -q | grep 'Memory' | grep '%' | cut -c '45-49'), E $(nvidia-smi -q | grep 'Encoder' | grep '%' | cut -c '45-49'), D $(nvidia-smi -q | grep 'Decoder' | grep '%' | cut -c '45-49')
Driver Version: $(nvidia-smi -q | grep 'Driver Version' | cut -zc '45-53') Temp: $(nvidia-smi -q | grep 'GPU Current Temp' | cut -c '45-46') °C
VRAM used/total: $(nvidia-smi -q | grep 'Used' | cut -zc '45-50') / $(nvidia-smi -q | grep 'Total' | cut -zc '44-52')
Power Draw: $(nvidia-smi -q | grep 'Power Draw' | cut -zc '45-52')"
@ntropy83
ntropy83 / .conkyrc
Created February 17, 2024 20:22
.conkyrc
# set to yes if you want Conky to be forked in the background
background yes
# Use Xft?
use_xft yes
# Xft font when Xft is enabled
#xftfont sans:size=10
xftfont Clean:size=9
@ntropy83
ntropy83 / gist:c5042c5ad1f439e209c846d46952aa85
Created February 10, 2024 19:50
Lenovo Yoga 9i Slim Pro Woofer activation
#!/bin/sh
# echo Turn on log!
# set -x
clear
function clear_stdin()
(
old_tty_settings=`stty -g`
stty -icanon min 0 time 0
while read none; do :; done
@ntropy83
ntropy83 / gist:a95e4996bda896742fb93c629448df46
Last active November 17, 2022 20:51
A conky that automatically switches with nvidia rtd3 suspend
## A conky that automatically switches with nvidia rtd3 suspend
## Below you find two files, both can go to the $HOME directory
## .conkyrc
# set to yes if you want Conky to be forked in the background
background yes
# Use Xft?
use_xft yes
#!/bin/bash
paru
if [[ $(paru -Qtdq) == "" ]];
then
echo -e '\n'
echo -e 'No orphaned packages found ...'
else
paru -Qtdq | paru -Rns -
### MangoHud configuration file
### Uncomment any options you wish to enable. Default options are left uncommented
### Use some_parameter=0 to disable a parameter (only works with on/off parameters)
### Everything below can be used / overridden with the environment variable MANGOHUD_CONFIG instead
################ PERFORMANCE #################
### Limit the application FPS
# fps_limit=
# GPU Clock (p-state, frequency (MHz), voltage (mV))
0 852 800
1 991 900
2 1084 950
3 1138 1000
4 1200 1050
5 1401 1100
6 1536 1000
7 1630 1000
# set to yes if you want Conky to be forked in the background
background yes
# Use Xft?
use_xft yes
# Xft font when Xft is enabled
#xftfont sans:size=10
xftfont Clean:size=10
# set to yes if you want Conky to be forked in the background
background yes
# Use Xft?
use_xft yes
# Xft font when Xft is enabled
#xftfont sans:size=10
xftfont Clean:size=10