pcdshub / shared-dotfiles

Shared configuration useful for PCDS engineers: "dot" files such as ~/.bashrc or .ssh/config
https://github.com/pcdshub/shared-dotfiles/blob/master/helpme.md
3 stars 11 forks source link

Useful files to add #1

Closed klauer closed 2 years ago

klauer commented 2 years ago

Sample bashrc, bash_profile

Sample vimrc with at least:

condarc with channels set?

ZLLentz commented 2 years ago

I think my files (maybe not the most recent versions?) minus slac-specific stuff are here: https://github.com/ZLLentz/zlentz-config Later I'll strip through my .bashrc_site file and bring some suggestions

ZLLentz commented 2 years ago

Later? How about now? Some normalish looking suggestions

# ssh magic
sshcd() { ssh -t "$1" "cd '$(pwd)'; bash"; }

# ssh shortcuts
alias psb='sshcd psbuild-rhel7'

# Typo shortcuts
alias flake7="flake8"
alias flake9="flake8"

# Watch a log file
ioclog() {
  tail -n 50 -f /reg/d/iocData/$1/iocInfo/ioc.log
}

# Setup happi
export HAPPI_CFG=/reg/g/pcds/pyps/apps/hutch-python/device_config/happi.cfg

# Python 3 hutch python shortcuts
hpy3() {
  hutch="${1}"
  "/reg/g/pcds/pyps/apps/hutch-python/${hutch}/${hutch}python"
}
alias tmo3="hpy3 tmo"
alias txi3="hpy3 txi"
alias rix3="hpy3 rix"
alias xpp3="hpy3 xpp"
alias xcs3="hpy3 xcs"
alias mfx3="hpy3 mfx"
alias cxi3="hpy3 cxi"
alias mec3="hpy3 mec"

# Always useful and/or never harmful sources
source /cds/group/pcds/pyps/conda/.tokens/typhos.sh
source /cds/group/pcds/setup/epics-ca-env.sh

# PCDS tools, etc.
pathmunge /reg/common/tools/bin
pathmunge /reg/g/pcds/engineering_tools/latest-released/scripts
source /reg/g/pcds/setup/pcds_shortcuts.sh

# Get epics environment
source /reg/g/pcds/setup/epicsenv-cur.sh

# So that the epics makes all work
export PSPKG_ROOT=/reg/g/pcds/pkg_mgr
ZLLentz commented 2 years ago

And this file has some useful aliases https://github.com/ZLLentz/zlentz-config/blob/master/ext/aliases

klauer commented 2 years ago
# Typo shortcuts
alias flake7="flake8"
alias flake9="flake8"

😆

These look good and useful!

tangkong commented 2 years ago

I shamelessly stole zach's config this weekend, and am in the process of making it my own. It's been somewhat of a long process, as I've not done such involved configuration before.

I feel like a lot of what I'd want to see in this config is found in the engineering-tools repo, at least for pcds/ecs related things.

klauer commented 2 years ago

I think that's great, @tangkong - as one of the newest users who's gone through the process of setting up your PCDS environment, you may have a lot of relevant information for this repository.

tangkong commented 2 years ago

Maybe some way of modifying the python path for local testing. We could use pathmunge for it too, but I just did this and never thought about it again.

# Add development folder to PYTHONPATH
export PYTHONPATH=$PYTHONPATH:"$(printf '%s:' ~/devrepos/*/)"
klauer commented 2 years ago

cc @ZryletTC - any thoughts on what to add here, or what might be useful for your fellow teammates? (See also the linked PR #3)