Skip to content

Instantly share code, notes, and snippets.

View johrstrom's full-sized avatar

Jeff Ohrstrom johrstrom

  • Lakeside Marblehead, Ohio. USA.
  • 04:20 (UTC -04:00)
View GitHub Profile
@johrstrom
johrstrom / gist:03498e9599dbcfc39b2005e5a02c3e50
Last active September 13, 2023 13:59
OSC starter bashrc
# .bashrc
function source_if_exists() {
if [ -f $1 ]; then
. $1
fi
}
function git_branch(){
git rev-parse --abbrev-ref HEAD 2> /dev/null
@johrstrom
johrstrom / gist:c444b97b7afe092300a151b67515a998
Last active May 14, 2021 18:34
Minimal bashrc to use at OSC
# .bashrc
function source_if_exists() {
if [ -f $1 ]; then
. $1
fi
}
function load_modules(){
modules=( 'git' 'project/classes' "ruby/$RUBY_VERSION")
@johrstrom
johrstrom / bashrc
Created May 12, 2021 15:59
My ~/.bashrc that I use on OSC systems
# .bashrc
function source_if_exists() {
if [ -f $1 ]; then
. $1
fi
}
# cat file descriptors (1 and 2, stdout and stderr)
function cfd() {
@johrstrom
johrstrom / exchange_k8s_token.md
Last active June 12, 2020 15:59
kubectl configure oidc with exchange tokens

configure K8s ODC Token

Here are some utiltiy scripts I use to muck about with OIDC tokens. Specifically getting tokens and exchanging them.

In this example you'll see that I see that I get a token for my development server, then exchange that token for one that I can use with kubernetes. I then configure my kubetctl to use that token.

@johrstrom
johrstrom / instructions_for_maya_desktop.md
Last active June 7, 2021 19:35
Create a AutoDesk Maya Desktop Icon for an OnDemand OSC Virtual Desktop

Instructions for Creating a desktop icon

This gist is a simple tutorial on how to create an AutoDesk Maya Desktop Icon on a linux based system.
It's primarily for users of Open Ondemand using Virutal Desktops (VDI), but could be helpful for any novice Linux user trying to figure out how to create a desktop icon from scratch.

  1. create a 'bin' directory in your home folder. You can do this through the Files explorer application with a button at top right labeled 'New Dir'.
  2. Copy and paste the 'maya.sh' shell script supplied in this gist into that newly created directory. You can download it from