Skip to content

Instantly share code, notes, and snippets.

View sudeepan's full-sized avatar

Sudeepan Datta sudeepan

View GitHub Profile

MicrOMEGAs 5.3.35 on Homebrew/CentOS7

In short, change compilers and flags in CalcHEP_src/FlagsForSh:

CC="gcc-12"
CFLAGS="-g -O2 -fcommon -fsigned-char -std=gnu99 -fPIC"

FC="gfortran-12"
FFLAGS="-g -O2 -fno-automatic"
@tueda
tueda / mad33_py23.md
Created November 22, 2021 07:21
Using MadGraph with Python2/3 virtual environments

Using MadGraph with Python2/3 virtual environments

One of the problems in the current version of MadGraph5_aMC@NLO (v3.3.0 as of November 2021) is the migration from Python 2 to Python 3 is incomplete, especially, in MadAnalysis 5 (v1.8). Here, we try to set up MadGraph5_aMC@NLO with making virtual environments both for Python 2 and 3, to avoid contaminating the user's environment (though all Python packages you need to install is only six). We assume that reasonably decent versions of Python executables are available (e.g., Python 2.7 and Python 3.7 as MadGraph5_aMC@NLO requires).

  1. Download MadGraph5_aMC@NLO and unpack the files. See https://launchpad.net/mg5amcnlo for the latest version of MadGraph5_aMC@NLO.

    wget https://launchpad.net/mg5amcnlo/3.0/3.3.x/+download/MG5_aMC_v3.3.0.tar.gz
    tar xvf MG5_aMC_v3.3.0.tar.gz
@garethrees
garethrees / format.sh
Created April 28, 2020 15:32
Format USB drive from the command line macOS
diskutil list
diskutil unmountDisk /dev/disk2
diskutil eraseDisk FAT32 SANDISK /dev/disk2
@vybstat
vybstat / ds_store_removal
Last active September 18, 2025 18:40
How to remove .DS_Store file from GitHub that Mac OS X creates
# remove .DS_Store file from GitHub that MAC OS X creates
# find and remove .DS_Store
find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch
# create .gitignore file, if needed
touch .gitignore
echo .DS_Store > .gitignore
# push changes to GitHub
@mislav
mislav / _readme.md
Last active April 1, 2026 07:38
tmux-vim integration to transparently switch between tmux panes and vim split windows

I use tmux splits (panes). Inside one of these panes there's a Vim process, and it has its own splits (windows).

In Vim I have key bindings C-h/j/k/l set to switch windows in the given direction. (Vim default mappings for windows switching are the same, but prefixed with C-W.) I'd like to use the same keystrokes for switching tmux panes.

An extra goal that I've solved with a dirty hack is to toggle between last active panes with C-\.

Here's how it should work: