Skip to content

Instantly share code, notes, and snippets.

@pellekrogholt
pellekrogholt / python2.4.rb
Created December 5, 2012 13:47 — forked from kingel/python2.4.rb
homebrew python2.4 formula (osx 10.8)
require 'formula'
class Python24 <Formula
url 'http://www.python.org/ftp/python/2.4.6/Python-2.4.6.tgz'
homepage 'http://www.python.org/download/releases/2.4.6/'
md5 '7564b2b142b1b8345cd5358b7aaaa482'
depends_on 'gdbm' => :optional
depends_on 'readline'
@pellekrogholt
pellekrogholt / configure.zcml
Created December 11, 2012 20:48
extend collective.contentrules.mail 0.4 / plone 3.1
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:five="http://namespaces.zope.org/five"
xmlns:browser="http://namespaces.zope.org/browser"
i18n_domain="mysite.site">
<include package="z3c.unconfigure" file="meta.zcml" />
<unconfigure>
<adapter factory="collective.contentrules.mail.adapter.MailReplacer" />
@pellekrogholt
pellekrogholt / gist:4353273
Created December 21, 2012 14:54
html start tags for various ie tweaks
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--[if IE 7]> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" class="ie7 oldie"> <![endif]-->
<!--[if IE 8]> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" class="ie8 oldie"> <![endif]-->
<!--[if gt IE 8]><!--> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <!--<![endif]-->
<head>
% NB! look up the channels in the label of the header
% niecetohave: map the over the label and recorddata in a better
% way for now we stick to the above:
AF3 = recorddata(3,:); % ch1
F7 = recorddata(4,:); % ch2
F3 = recorddata(5,:); % ch3
FC5 = recorddata(6,:); % ch4
T7 = recorddata(7,:); % ch5
P7 = recorddata(8,:); % ch6
[core]
excludesfile = /Users/pelle/.gitignore
pager = "/bin/cat"
editor = "/Applications/Emacs.app/Contents/MacOS/bin/emacsclient"
[color]
diff = auto
branch = auto
status = auto
%% Simple experiment 2 minutes open eyes then 2 minutes closed eyes
%% in a relaxed position.
%%
%% 2 datasets with 1 epoch for each
%%
%% require eeglab to be loaded:
%% >> cd <path>/eeglab
%% >> eeglab
%%
%% Simple experiment 2 minutes open eyes then 2 minutes closed eyes
%% in a relaxed position.
%%
%% 1 dataset with 2 epochs
%%
%% require EEGLAB to be loaded:
%% >> cd <path>/eeglab
%% >> eeglab
%%
@pellekrogholt
pellekrogholt / backgridexamplesimple.coffee
Created September 23, 2013 08:30
simple backgrid exmple as cofffe
log = (args...) ->
console.log.apply console, args if console.log?
# ------------------------------------- MODEL / COLLECTIONS
Territory = Backbone.Model.extend()
Territories = Backbone.Collection.extend(
@pellekrogholt
pellekrogholt / README.md
Created September 30, 2013 08:23 — forked from mbostock/.block

Bubble charts encode data in the area of circles. Although less perceptually-accurate than bar charts, they can pack hundreds of values into a small space. Implementation based on work by Jeff Heer. Data shows the Flare class hierarchy, also courtesy Jeff Heer.

@pellekrogholt
pellekrogholt / collision.coffee
Last active December 24, 2015 07:09
could find the gist for http://mbostock.github.io/d3/talk/20111018/collision.html so here is a replication
# w = 1280, h = 800
collide = (node) ->
r = node.radius + 16
nx1 = node.x - r
nx2 = node.x + r
ny1 = node.y - r
ny2 = node.y + r
(quad, x1, y1, x2, y2) ->
if quad.point and (quad.point isnt node)
x = node.x - quad.point.x