Skip to content

Instantly share code, notes, and snippets.

git clone https://github.com/indra-net/indra-client.git ~/mindwave-client
cd ~/mindwave-client
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
echo "$DIR/venv/bin/python $DIR/server/local-server.py" > indra
chmod +x indra
sudo mv indra /bin/
pip install virtualenv
virtualenv venv
venv/bin/pip install -r requirements.txt
@elsehow
elsehow / indra-couch-views.js
Last active August 29, 2015 14:22
Couch DB views or for indra
// here are a couple couchDB views I think might be handy
// use these as tempaltes for some views of your own
// if you're starting from a fresh couchDB, you'll have to add these views to a design document - consult couchDB reference for more info
// byCreatedAt
function(doc) {
var type, data, createdAt;
if (doc.type && doc.data && doc.createdAt) {
emit(doc.createdAt, doc);
}
# find the first match for selector within $div
$findIn = ($div, selector) -> $div.find(selector).first()
$setEnabled = ($div, value) -> $div.prop('disabled', !value)
'''
Forked from https://github.com/wazaahhh/brainlib
Edited down for the sake of tutorial.
'''
import numpy as np
from scipy import stats
from scipy.interpolate import interp1d
'''Here all functions related to the analysis of EEG signal,
# this is forked from npdoty
# https://github.com/npdoty/dissertation
# much has been removed from his version
# so, if doing something fancy, consult with that first
## Markdown extension (e.g. md, markdown, mdown).
MEXT = md
## All markdown files in the working directory
@elsehow
elsehow / npm-debug.log
Created January 29, 2016 01:18
install error on ubuntu
183837 info preinstall abp-filter-parser-cpp@1.1.5
183838 verbose unsafe-perm in lifecycle false
183839 info abp-filter-parser-cpp@1.1.5 Failed to exec preinstall script
183840 verbose unlock done using /home/ffff/.npm/_locks/abp-filter-parser-cpp-222f0f388a7a923b.lock for /home/ffff/Downloads/browser-laptop/node_modules/abp-filter-parser-cpp
183841 verbose stack Error: tracking-protection@1.0.8 preinstall: `npm install hashset-cpp && npm install cppunitlite`
183841 verbose stack Exit status 1
183841 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:214:16)
183841 verbose stack at EventEmitter.emit (events.js:98:17)
183841 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:24:14)
183841 verbose stack at ChildProcess.emit (events.js:98:17)
@elsehow
elsehow / init.org
Last active February 8, 2016 20:00
a vim-er's init for emacs

a (literate) emacs config for vim people

for people who like vim, but would like org-mode and its agenda even more :)

my eventual intention is to annotate this with lots of info about the joy and beauty of org mode.

first-time setup

First, place the raw version of this file in ~/.emacs.d/init.org

Then do M-x org-babel-load-file (M-x means pressing Alt and x

first, install from the lein template:

lein new figwheel-node hello-world
cd hello-world
npm install

Start Figwheel from one terminal window:

lein figwheel
const Kefir = require('kefir')
// NO MODES
// EVERYTHING IS COMMANDS
// EVEN IF SOME COMMANDS ARE AUTO-POPULATE
function api (param) {
// here we can close over some mutable state
// if we need to
@elsehow
elsehow / .htaccess
Created May 10, 2016 18:49
redirect all http traffic to https trafic, preserving subdomain
RewriteEngine On
RewriteCond %{HTTP_HOST} ^chat.cosmopol.is/$ [OR]
RewriteRule (.*) https://chat.cosmopol.is/$1 [L,R]