Skip to content

Instantly share code, notes, and snippets.

@massich
massich / plot_oldfiles_set_montage.py
Created September 18, 2019 11:25
MNE-Python how to set up montage to old fif file
# -*- coding: utf-8 -*-
"""
.. _plot_montage:
Setting up a standard montage template into an old file
=======================================================
This example illustrates how to update ``ch_names`` in `DigMonge`.
""" # noqa: D205, D400
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
@massich
massich / test_libmatio.cc
Last active April 2, 2019 14:54
libmatio test for homebrew formula
#include <stdlib.h>
#include <matio.h>
size_t dims[2] = {5, 5};
double data[25] = {0.0, };
mat_t *mat;
matvar_t *matvar;
int main(int argc, char **argv) {
@massich
massich / plot_camcan_example.py
Created October 24, 2018 15:49
mne camcan tutorial from parietal's mne assingment
# -*- coding: utf-8 -*-
"""
========================
cam-CAN tutorial dataset
========================
"""
#!/bin/sh
# This script installs Travis helper functions and tools used in openmeeg repositories
#
# To use them, add the following lines in .travis.yml:
# - export DL_DIR=$HOME/downloads # Export the path where to store downloaded files
# - curl -fsSkL https://gist.github.com/massich/f382ec0181ce6603b38208f9dec3e4d4/raw > x.sh && source ./x.sh
function _download() {
@massich
massich / travis_install_mkl_linux_mac.sh
Last active February 22, 2021 07:01
This script is used to install Intel MKL
#!/bin/sh
# This script installs Intel's Math Kernel Library (MKL) on Travis (both Linux and Mac)
#
# In .travis.yml, add this:
#
# - curl -fsSkL https://gist.githubusercontent.com/massich/caa7d8806ac08282f93cea00f247b8e0/raw > install_mkl.sh && source ./install_mkl.sh
#
# Note:
# This script requires the openmeeg's travis tools from https://gist.github.com/massich/f382ec0181ce6603b38208f9dec3e4d4
# This is a nix packaging for ITKSnaps
#
# Assumptions:
# - Itksnaps has been downloaded and untar so that the tee looks as follow
# tar: /home/userName/itksnaps/itksnap-3.6.0-20170401-Linux-x86_64.tar.gz
# nix: /home/userName/itksnaps/itksnap.nix
# binary: /home/userName/itksnaps/itksnap-3.6.0-20170401-Linux-x86_64/bin/itksnap
# libraries: /home/userName/itksnaps/itksnap-3.6.0-20170401-Linux-x86_64/lib/snap-3.6.0/*
#
#
@massich
massich / 0_reuse_code.js
Created December 1, 2015 10:12
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@massich
massich / tmux libevent
Last active August 29, 2015 14:19 — forked from drio/tmux libevent
NOTE: I am using bash for this.
NOTE2: Another approach for getting tmux would be to use gentoo-prefix or netbsd's pkgsrc. I
didn't have too much luck with gentoo-prefix. NetBSD was pretty straight forward but it had
an old version of tmux (1.1).
Here is how to get tmux compiled if you can get your systadmins to installed it ... or
any other weird reason. I assume you have some basic libraries and headers installed (like
ncurses, etc...). If not, you'll have to compile those ones too.
@massich
massich / _readme.md
Last active August 29, 2015 14:19 — forked from shime/_readme.md

Having trouble installing the latest stable version of tmux?

I know, official package for your OS/distro is outdated and you just want the newest version of tmux.

Well, this script should save you some time with that.

Prerequisities

  • gcc