Skip to content

Instantly share code, notes, and snippets.

View drabb's full-sized avatar
🔕

Dan Rabb drabb

🔕
View GitHub Profile
@drabb
drabb / cpu_epp.sh
Created August 24, 2023 12:37
echo Linux AMD p-state settings
#!/bin/bash
green="\033[32m"
reset="\033[0m"
SCALING=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver)
EPP_SETTING=$(cat /sys/devices/system/cpu/cpu0/cpufreq/energy_performance_preference)
GOVERNOR_SETTING=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)
echo
@drabb
drabb / feature_branch.sh
Created August 23, 2023 18:36
feature_branch
#!/bin/bash
if [[ "$1" == "-c" ]]; then
git checkout "$(git branch | awk '{$1=$1};1' | awk '!/\*/ {print $0}' | gum choose --height=20)" && git pull
else
#PREFIX=$(gum input --placeholder "Prefix" --value "CU")
PREFIX="CU"
TASK=$(gum input --placeholder "ClickUP Task ID")
TASK="${PREFIX}-${TASK:1}"
@drabb
drabb / calc.sh
Last active December 27, 2022 17:58
stupid bash tricks
#!/bin/bash
echo "$1" | bc -l
@drabb
drabb / .gitconfig
Last active May 25, 2023 13:50
Git Aliases
[user]
name = Dan Rabb
email = dan@danrabb.com
[core]
askpass = git-gui--askpass
editor = vim
[alias]
last = log -1 HEAD
logline = log --pretty=format:\"%C(yellow)%h %C(blue)%ad %C(red)(%an) %C(reset)%s\" --date=short
lol = logline