Skip to content

Instantly share code, notes, and snippets.

View widged's full-sized avatar

Marielle Lange widged

View GitHub Profile
@widged
widged / Readme.md
Last active August 28, 2015 10:43
Instant server without command line

For when you get tired of having to open the command line to quickly check a javascript demo that requires the code to run over a server.

Save the file server.command on your machine, make it executable chmod u+x server.command, drop (with copy) the file in the demo folder, double click on it. Press the reload button on the browser window that automatically opened.

For the nodeserver, you must have http-server pre-installed (npm install -g http-server)

@widged
widged / Agist.txt
Last active August 29, 2015 13:55
Vegetable Graph
== Plant Explorer in Neo4j
:neo4j-version: 2.0.0
:author: Marielle Lange
:twitter: @widged
:tags: gardening
Note. A new extended version is available at link:http://widged.github.io/neoconsole/[github/neoconsole]. There, you will find the code rewritten in a more modular way and made to work within a gist as well as a within a standalone webpage.
The goal is to explore how grqphgist can be used to feed data to d3js visualisations. Vegetable data have been obtained through the scrapping of various websites. They have been normalized to bring to a common scale data on different measurement units or dates from different hemispheres. Then they have been reduced, to binify any continuous data.
@widged
widged / Agist.txt
Last active August 29, 2015 13:55 — forked from widged/Agist.txt
== Plant Explorer in Neo4j
:neo4j-version: 2.0.0
:author: Marielle Lange
:twitter: @widged
:tags: gardening
The goal is to explore how graphgist can be used to feed data to d3js visualisations. Vegetable data have been obtained through the scrapping of various websites. They have been normalized to bring to a common scale data on different measurement units or dates from different hemispheres. Then they have been reduced, to binify any continuous data.
To avoid to overtax the console, only one plant is loaded in this example ("anise").
@widged
widged / README.md
Last active August 29, 2015 14:10 — forked from grahamjenson/README.md

Fork to demonstrate how promises can easily be replaced with some async functions. Added the option to switch between an animation where all tiles are moved in paralles and one where all tiles are moved in sequence.

A word of warning. I code javascript in the context of kiosk apps that run a specific browser. I am not used to have to support multiple browsers. I go for pure vanillajs whenever possible. Tested on the latest version of Chrome Canary. Should work on most modern browsers.


Original text follows

I recently wanted to implement a visualisation of a stream of incoming events. For the visualisation I wanted a list where the latest event is added to the beginning and the other events move down the list in a snake like pattern (to minimise the amount of movement). This is an example click on the squares to see my implementation in action. I used jQuery promises (which I recently blogged

// Person Module
var Person = (function ( ) {
'use strict';
// Any static variable can be declared here.
var Class = function Person() {
if(!this instanceof Person) { return new Person(); }
var instance = this;
@widged
widged / Installing R on dreamhost
Created August 4, 2011 02:01 — forked from leoniedu/Installing R on dreamhost
Installing R on dreamhost
## First do the unix account setup http://wiki.dreamhost.com/Unix_account_setup
cd ${HOME}
# create the first level directories (and log/setup)
mkdir -pv soft run www log log/setup backup data
# create the second level directories within run (our own FHS)
for subdir in bin etc include lib man share
do
mkdir -pv run/${subdir}
done
# symlink so that man pages stay all in the same place
@widged
widged / gist:1915768
Created February 26, 2012 09:56
How to reuse content with Sencha Touch - stackoverflow question
/*
Code for question on stackoverflow - http://stackoverflow.com/questions/9432309/how-to-reuse-content-with-sencha-touch
Expanding on a SenchaFiddle contributed by rdougan.
*/
Ext.Loader.setConfig({ enabled: true });
var topStore = Ext.create('Ext.data.Store', {
//give the store some fields
@widged
widged / .gitignore
Created October 12, 2015 10:39 — forked from tomgp/.gitignore
Ternary Plot refactoring.
notional2005result.csv
notional2005result.json
@widged
widged / bertin500x490.jpg
Created October 12, 2015 10:42 — forked from tomgp/bertin500x490.jpg
Vibrational effect 1
bertin500x490.jpg

LOAD CSV into Neo4j quickly and successfully

Since version 2.1 Neo4j provides out-of-the box support for CSV ingestion. The LOAD CSV command that was added to the Cypher Query language is a versatile and powerful ETL tool. It allows you to ingest CSV data from any URL into a friendly parameter stream for your simple or complex graph update operation, that …​ conversion.