Skip to content

Instantly share code, notes, and snippets.

View rubensworks's full-sized avatar
💭
🚀Power-coding

Ruben Taelman rubensworks

💭
🚀Power-coding
View GitHub Profile
@rubensworks
rubensworks / gist:5178205
Created March 16, 2013 20:34
pseudocode van mijn visie
dashboardmapje = new HashMap<Type, Result>();
dashboardmapje.put(indepentent, [de independent view]
dashboardmapje.put(admin, [de admin view]
public static Result dashboard(){
User user = SomeMagicClass.getCurrentUser();
if(user.getRoles().contains(Role.LOGIN)) {
return dashboardmapje.get(user.getType())
}
else {
var config = {
channels: ["#seriouslee"],
server: "irc.esper.net",
botName: "SeriousBot"
};
var MAX_RANDOM_TIMEOUT = 20000000;
var randomMessages = [
"PRRRRRRRT!",
@rubensworks
rubensworks / completion-for-gradle.md
Last active November 17, 2015 11:56 — forked from nolanlawson/completion-for-gradle.md
Gradle tab completion for Bash. Works on both Mac and Linux.

Gradle tab completion script for Bash

A tab completion script that works for Bash. Relies on the BSD md5 command on Mac and md5sum on Linux, so as long as you have one of those two commands, this should work.

Usage

$ gradle [TAB]
Verifying that +rubensworks is my blockchain ID. https://onename.com/rubensworks
/** IOS Press template
*
* Ruben Taelman <ruben.taelman@ugent.be> http://www.rubensworks.net/
* http://www.apache.org/licenses/LICENSE-2.0.html Apache License, Version 2.0
* Based on Sarven's ACM CSS template: https://github.com/linkeddata/dokieli/blob/master/media/css/acm.css
*/
/*
SWJ IOS Press template: http://www.semantic-web-journal.net/authors
*/
# Cyclops Contributor License Agreement
Adapted from https://cla.github.com/agreement
The following terms are used throughout this agreement:
* You - the person or legal entity including its affiliates asked to accept this agreement. An affiliate is any entity that controls or is controlled by the legal entity, or is under common control with it.
* Project - is an umbrella term that refers to any and all GitHub open source projects.
* Contribution - any type of work that is submitted to a Project, including any modifications or additions to existing work.
* Submitted - conveyed to a Project via a pull request, commit, issue, or any form of electronic, written, or verbal communication with GitHub, contributors or maintainers.
# Comunica Contributor License Agreement
The following terms are used throughout this agreement:
* You - the person or legal entity including its affiliates asked to accept this agreement. An affiliate is any entity that controls or is controlled by the legal entity, or is under common control with it.
* Project - is an umbrella term that refers to any and all GitHub open source projects.
* Contribution - any type of work that is submitted to a Project, including any modifications or additions to existing work.
* Submitted - conveyed to a Project via a pull request, commit, issue, or any form of electronic, written, or verbal communication with GitHub, contributors or maintainers.
## 1. Grant of Copyright License.

This is a short guide that explains how you can execute a federated query with Comunica.

Command line

We will execute a query to find all books in the Harvard Library that were written by people who were born in Ghent. We do this by federating over DBpedia (SPARQL), the Harvard library (TPF) and the VIAF dataset (TPF).

  1. Make sure Node.js (>=8.0.0) is installed: https://nodejs.org/en/
  2. Install Comunica: npm install -g @comunica/actor-init-sparql
  3. Execute the following command:
:myFriends {
  ex:Alice foaf:knows ex:Bob.
  ex:Alice foaf:knows ex:Carol.
}

Remove a single quad

I guess this is supported?

GraphQL-LD

GraphQL-LD is a way to query Linked Data using GraphQL.

Instead of querying GraphQL interfaces, Linked Data interfaces are queried, such as SPARQL endpoints, TPF interfaces, Linked Data documents, ... This is done by semantifying GraphQL queries using a JSON-LD context.

Try it out from your browser: http://query.linkeddatafragments.org/

Alternatively, install GraphQL-LD or Comunica SPARQL and execute GraphQL-LD queries on your machine