Skip to content

Instantly share code, notes, and snippets.

View jasmainak's full-sized avatar

Mainak Jas jasmainak

View GitHub Profile
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active November 2, 2024 12:56
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@agramfort
agramfort / ft_buffer_realtime_plot.py
Last active January 4, 2016 00:49
plot data from Fieldtrip realtime buffer with Python and Chaco
# Author : Alex Gramfort
# license BSD (copied for Chaco example data_stream.py)
# to use it:
# Start ./sine2ft in the background (available in fieldtrip repo)
# Start the buffer
# Then run this script in a python terminal
# Major library imports
import sys
@agramfort
agramfort / output.txt
Created March 16, 2014 08:05
Test effect of nave on dSPM
returns:
27.0745537031
365.073216463
27.1356784749
@AnwarShah
AnwarShah / sublime-text-3.desktop
Created December 12, 2015 14:23 — forked from thebinarypenguin/sublime-text-2.desktop
A desktop application launcher for Sublime Text 3
[Desktop Entry]
Type=Application
Terminal=false
StartupNotify=true
Name=Sublime Text 3
Name[en_US]=Sublime Text 3
GenericName=Text Editor
GenericName[en_US]=Text Editor
Comment=Edit text files
Comment[en_US]=Edit text files
@mmcc
mmcc / install-docker-mint.sh
Last active October 17, 2022 19:52 — forked from sirkkalap/Install-Docker-on-Linux-Mint.sh
Install Docker on Linux Mint 17
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sh -c 'echo deb https://apt.dockerproject.org/repo ubuntu-trusty main > /etc/apt/sources.list.d/docker.list'
# Install docker
sudo apt-get update
sudo apt-get purge lxc-docker
sudo apt-get install linux-image-extra-$(uname -r)
sudo apt-get install docker-engine
sudo service docker start
@DrDub
DrDub / selectfile.py
Created January 3, 2016 11:44
A file selection class build for ipywidgets without any extra dependencies.
import os
import ipywidgets as widgets
class FileBrowser(object):
def __init__(self):
self.path = os.getcwd()
self._update_files()
@agramfort
agramfort / lasso_ista_fista.py
Created January 31, 2016 14:33
Lasso with ISTA and FISTA
#!/usr/bin/env python
#
# Solve LASSO regression problem with ISTA and FISTA
# iterative solvers.
# Author : Alexandre Gramfort, [email protected]
# License BSD
import time
from math import sqrt
# -*- coding: utf-8 -*-
# Authors: Eric Larson <[email protected]>
#
# License: BSD (3-clause)
from __future__ import print_function
from copy import deepcopy
import time
@clbarnes
clbarnes / neuron_install.md
Last active February 29, 2024 13:11
These instructions are for installing NEURON and NetPyNE with linux and a conda environment.

Install instructions

These instructions are for installing NEURON and NetPyNE with linux and a conda environment.

Create a neuron directory in your home directory, put the gzipped source files in it, and expand them.

cd $HOME
mkdir neuron
mv iv-mm.tar.gz neuron