Skip to content

Instantly share code, notes, and snippets.

View stefano-meschiari's full-sized avatar
🧑‍🔬

Stefano Meschiari stefano-meschiari

🧑‍🔬
View GitHub Profile
@stefano-meschiari
stefano-meschiari / systemic.md
Last active March 1, 2020 23:53
Running Systemic 2.2 on Mac OS X 10.15

These instructions should allow you to run Systemic 2.2 on Mac OS X 10.15. It assumes the latest version of R (3.6.1) and a JDK is installed.

  1. Install Xcode from the Mac App Store.
  2. From a command line, install the command line developer tools:
    xcode-select --install
    
    and follow the prompt that will pop up.
plot(rnorm(10), rnorm(10), xlab=latex2exp('\\alpha'), ylab=latex2exp('\\beta'))
@stefano-meschiari
stefano-meschiari / gist:3c7e4ca992dc858bfaa1
Created May 1, 2015 22:32
Loop over orbital elements
# Create grids for periods, masses, ecc, mean anomaly, and longitude of pericenter
periods <- ...
masses <- ...
eccentricities <- c(0, 0.1, 0.2)
mas <- seq(0, 360, length.out=(N/2))[-1]
lops <- seq(0, 360, length.out=(N/2))[-1]
# Create a list of detection matrices; each element corresponds to the recovery rate matrix
# in (P, M) for the eccentricity.
detection.list <- list()
@stefano-meschiari
stefano-meschiari / git_prompt.md
Created January 28, 2015 23:39
Extend your prompt to show the status of your current git branch (e.g. whether changes need to be committed)

Add these lines to your startup bash file (e.g. ~/.bash_profile or ~/.bashrc):

function parse_git_dirty {
    [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit, working directory clean" ]] && echo "*"
}
function parse_git_branch {
    git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
}
@stefano-meschiari
stefano-meschiari / gist:9217695
Created February 25, 2014 21:03
AUCTeX configuration
;; AucTeX
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq-default TeX-master nil)
(add-hook 'LaTeX-mode-hook 'visual-line-mode)
(add-hook 'LaTeX-mode-hook 'flyspell-mode)
(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
(setq reftex-plug-into-AUCTeX t)