Skip to content

Instantly share code, notes, and snippets.

@martinus
Created August 17, 2021 08:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martinus/ef84cf000385e75b36af06abe01a208d to your computer and use it in GitHub Desktop.
Save martinus/ef84cf000385e75b36af06abe01a208d to your computer and use it in GitHub Desktop.
helpful aliases for development
# cd to native directory and run the commands
run_in_venv() (
if [ -z "$VIRTUAL_ENV" ]; then
source ~/git/venv/bin/activate
fi
$@
)
# Sets CPU into a fixed state for the call, then resets it back.
bench() (
if [ -z "$VIRTUAL_ENV" ]; then
source ~/git/venv/bin/activate
fi
sudo pyperf system tune
$@
sudo pyperf system reset
)
# run a large batch process, e.g. ninja / make build so it doesn't interfere much wich the system usabililty.
alias batch="schedtool -B -n 20 -e"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment