Skip to content

Instantly share code, notes, and snippets.

View michael's full-sized avatar

Michael Aufreiter michael

View GitHub Profile
@michael
michael / article-test.js
Last active August 29, 2015 13:56
Substance Article 0.3.0 released
// Setup
// -----------
//
// $ npm install substance-article
// Browser bundle: http://cdn.substance.io/substance-article-0.3.0.js
var Article = require("substance-article");
// Create a new article
var doc = new Article();
@michael
michael / gist:9916295
Last active August 29, 2015 13:57
Sloan Proposal: Open Annotation for Science

Vision

Content providers across all domains (scientific publishing, news, education, books) are facing the very same challenges when it comes to implementing an effective digital publishing workflow. From receiving a manuscript to peer review to publishing many manual steps are necessary. Communication usually happens offline (via email etc.) which is not only costly and time-consuming but also error-prone and intransparent. An ultimate goal would be to create a fully integrated, interactive environment that closes the gap between authors and publishers.

On the authors side we want a document authoring tool available as web-based component as well as local application e.g., for mobile devices,

[
// source is key-reference of target (experiment)
{
id: "key_reference_348989",
source: "http://dx.doi.org/10.1016/j.immuni.2011.09.013",
target: "http://dx.doi.org/10.7554/eLife.00778",
type: 'key_reference',
key_reference_type: "experiment",
description: 'A ground breaking experiment can be found here.',
creators: [],
// Example results for an an article relationships service
module.exports = {
// Research Advance Usecase
"http://dx.doi.org/10.7554/eLife.00461": [
{
"id": "relationship_1",
"relationship_type": 'advance',
"description": 'Building on previous work (Bai et al., 2013), we describe an algorithm that allows cryo-EM structure determination to near-atomic resolution for protein complexes as small as 170 kDa.',
"creators": [{"name": "Donald Duck", "orcid": "0000-2342-5674-0043"}],
body {
background: #F8F8F8;
}
body {
overflow: auto;
}
/* Clearfix solution */
#menu .toolbar-view .modes {
float: right;
height: 50px;
padding: 10px;
overflow: hidden;
}
#menu .toolbar-view .modes a {
display: block;
float: left;
@michael
michael / tree-conversion.js
Last active August 29, 2015 14:11
tree-conversion.js
this.getSubjectsTree = function() {
var subjects = this.getEntities();
// Build a map of parents referencing their kids
var map = {};
_.each(subjects, function(subject) {
var parent = subject.parent || "root";
if (!map[parent]) {
map[parent] = [ subject ];
} else {
@michael
michael / virtual-box-cheating.md
Last active August 29, 2015 14:14
Virtual Box Cheating

See local available dist images (they are stored locally around 400mb size they have)

vagrant box list

To create a new vagrant env do this:

vagrant init

Now edit Vagrantfile

[
{
"property": "subjects",
"name": "Subjects",
"values": [
{
"frequency": 16,
"name": "Developmental biology and stem cells",
"selected": false
},