Skip to content

Instantly share code, notes, and snippets.

View aescalante's full-sized avatar

Alberto Escalante del Valle aescalante

View GitHub Profile
@aescalante
aescalante / terminal-prompt-git-branch-zsh.md
Created March 24, 2022 17:11 — forked from reinvanoyen/terminal-prompt-git-branch-zsh.md
Add Git Branch Name to Terminal Prompt (MacOS Catalina zsh)

Add Git Branch Name to Terminal Prompt (MacOS Catalina zsh)

screenshot

Open ~/.zshrc in your favorite editor and add the following content to the bottom.

function parse_git_branch() {
    git branch 2> /dev/null | sed -n -e 's/^\* \(.*\)/[\1]/p'
}
@aescalante
aescalante / epsilonToCtau.py
Created August 11, 2020 16:33
epsilon to ctau converter
import numpy as N
def getGammaEpsilon(mass):
# numbers obtained from https://arxiv.org/pdf/1412.0018.pdf
if mass == 0.4:
ratio = 0.00223
if mass == 1:
ratio = 0.00856
if mass == 3: