Skip to content

Instantly share code, notes, and snippets.

View widged's full-sized avatar

Marielle Lange widged

View GitHub Profile
@widged
widged / index.html
Created October 3, 2013 01:35
ResponsiveTester Usage
<!DOCTYPE html>
<head>
<! -- ... -->
<link rel="stylesheet" href="css/responsiveTester.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
<! -- ... -->
</head>
<body>
@widged
widged / d3lib.md
Created October 4, 2013 03:29
d3 libraries

chartFactory

/affini-tech/ChartFactory

Based on D3.JS and Dimple, ChartFactory provide the ability to build quickly D3.JS charts without coding any lines of javascript. Just define your dashboard in a JSON and voila !

charts: [
        {id:'chart1',
         width:800,height:250,

xAxis:{type:'Category',field: "Month",orderRule:'Date'},

year name number rank notes
1999 Joshua 649 1
1999 Liam 456 2
1999 Samuel 445 3
1999 Matthew 440 4
1999 Jack 430 5
1999 Benjamin 416 6
1999 Daniel 389 7
1999 James 372 8
1999 Thomas 357 9
@widged
widged / neo4j-install.md
Last active July 11, 2020 11:57
Neo4j on the raspberry pi. Installation steps

My pi runs a raspbian distro (2013-09-25-wheezy-raspbian.zip)

Java

What the raspberry page officially recommends is the jdk. (Source: http://www.raspberrypi.org/archives/4920).

sudo apt-get update && sudo apt-get install oracle-java7-jdk

However, this doesn't include a server on the pi. The jre needs to be installed instead.

@widged
widged / index.html
Last active January 3, 2016 07:18
svg resizing
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>SVG resizing</title>
</head>
<body>
<svg viewBox="0 0 1000 1000" style="width: 32px;height:32px" xmlns="http://www.w3.org/2000/svg">
<path d="m 117.49678,1.6479 c -14.35645,7.8524 -14.78576,10.4977 -14.78576,91.10661 l 0,77.21615 62.70852,63.00916 62.70852,63.00913 -8.22682,26.0425 c -10.93085,34.60229 -15.33006,60.17339 -16.23053,94.34261 l -0.74504,28.27088 -82.14316,0.0821 c -88.982675,0.0892 -95.090572,1.13177 -102.975897,17.57719 -5.159433,10.76036 -0.437357,26.46541 9.567322,31.81976 3.359376,1.79789 43.918753,3.16015 94.088305,3.16015 l 88.1835,0 4.38439,18.89293 c 2.41141,10.39111 8.12715,28.25212 12.70164,39.69114 l 8.31724,20.79826 -66.169,66.45637 -66.16899,66.45638 0,78.00249 0,78.0025 8.06496,8.06496 c 12.95118,12.95118 31.5414,10.46328 39.69959,-5.31294 3.74436,-7.24078 4.80707,-23.68624 4.80707,-74.38945 l 0,-65.09362 53.75743,-53.68337 53.75744,-53.68337 7.72345,11.00627 c 4.2479,6.05345 15.78494,19.52589 25.63788,29.938
@widged
widged / Readme.md
Last active January 3, 2016 07:29
Multicharacter codes in svg fonts

SVG font for iconography

Quick exploration of icon svg fonts for rapidly generating iconography in graphs. See the examples live on bl.ocks

Icon class

This is the standard solution. The one adopted by popular icon fonts like font awesome.

Each icon is mapped onto a unique unicode character.

@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;