Skip to content

Instantly share code, notes, and snippets.

View csarven's full-sized avatar
👽
https://csarven.ca/#i

Sarven Capadisli csarven

👽
https://csarven.ca/#i
View GitHub Profile
@csarven
csarven / getting-started.md
Created November 15, 2016 13:09 — forked from joepie91/getting-started.md
Getting started with Node.js

"How do I get started with Node?" is a commonly heard question in #Node.js. This gist is an attempt to compile some of the answers to that question. It's a perpetual work-in-progress.

And if this list didn't quite answer your questions, I'm available for tutoring and code review! A donation is also welcome :)

Setting expectations

Before you get started learning about JavaScript and Node.js, there's one very important article you need to read: Teach Yourself Programming in Ten Years.

Understand that it's going to take time to learn Node.js, just like it would take time to learn any other specialized topic - and that you're not going to learn effectively just by reading things, or following tutorials or courses. Get out there and build things! Experience is by far the most important part

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX qb: <http://purl.org/linked-data/cube#>
PREFIX sdmx-dimension: <http://purl.org/linked-data/sdmx/2009/dimension#>
PREFIX sdmx-measure: <http://purl.org/linked-data/sdmx/2009/measure#>
CONSTRUCT {
?resource skos:prefLabel ?prefLabel .
}
WHERE {
@csarven
csarven / useSchemaOrg.sed
Last active February 7, 2016 19:38
Replacing non-schema.org terms (in Linked Research) with schema.org
s/biblio:Paper/schema:ScholarlyArticle/g
s/bibo:shortTitle/schema:alternateName/g
s/cal:dtend/schema:endDate/g
s/cal:dtstart/schema:startDate/g
s/cal:location/schema:location/g
s/cal:Vevent/schema:Event/g
s/cc:license/schema:license/g
s/dcterms:abstract/schema:abstract/g
s/dcterms:contributor/schema:contributor/g
s/dcterms:creator/schema:creator/g
#$ diff cc-ns.original.html cc-ns.fixed.html
14c14
< <h1><a href="/"><span><img src="https://creativecommons.org/images/logo_trademark_250.png" alt="Creative Commons" id="cc-title" border="0"/></a></h1>
---
> <h1><a href="/"><img src="https://creativecommons.org/images/logo_trademark_250.png" alt="Creative Commons" id="cc-title" border="0"/></a></h1>
241a242
> </div>
<qb:Observation rdf:about="/data/migr_asydcfstq#Q,AD,F,TOTAL,GENCONV,AT,2013Q2">
<qb:dataSet rdf:resource="/data/migr_asydcfstq"></qb:dataSet>
<sdmx-dimension:freq rdf:resource="http://purl.org/linked-data/sdmx/2009/code#freq-Q"></sdmx-dimension:freq>
<property:citizen rdf:resource="/dic/citizen#AD"></property:citizen>
<property:sex rdf:resource="/dic/sex#F"></property:sex>
<property:age rdf:resource="/dic/age#TOTAL"></property:age>
<property:decision rdf:resource="/dic/decision#GENCONV"></property:decision>
<property:geo rdf:resource="/dic/geo#AT"></property:geo>
<sdmx-dimension:timePeriod rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2013-04-01</sdmx-dimension:timePeriod>
<sdmx-measure:obsValue>0</sdmx-measure:obsValue>
<http://eurostat.270a.info/dataset/tps00001/A/JAN/AT/2012> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://purl.org/linked-data/cube#Observation> .
<http://eurostat.270a.info/dataset/tps00001/A/JAN/AT/2012> <http://purl.org/linked-data/cube#dataSet> <http://eurostat.270a.info/dataset/tps00001> .
<http://eurostat.270a.info/dataset/tps00001/A/JAN/AT/2012> <http://eurostat.270a.info/property/FREQ> <http://purl.org/linked-data/sdmx/2009/code#freq-A> .
<http://eurostat.270a.info/dataset/tps00001/A/JAN/AT/2012> <http://eurostat.270a.info/property/indic_de> <http://eurostat.270a.info/code/1.0/CL_INDIC_DE/JAN> .
<http://eurostat.270a.info/dataset/tps00001/A/JAN/AT/2012> <http://eurostat.270a.info/property/geo> <http://eurostat.270a.info/code/1.0/CL_GEO/AT> .
<http://eurostat.270a.info/dataset/tps00001/A/JAN/AT/2012> <http://eurostat.270a.info/property/TIME_PERIOD> <http://reference.data.gov.uk/id/year/2012> .
<http://eurostat.270a.info/dataset/tps00001/A/JAN/AT/2012> <http://eurostat.270a.info/property/OBS_
SELECT ?datasetTitle ?source
WHERE {
{SERVICE <http://worldbank.270a.info/sparql> {
SELECT ?datasetTitle ?source
WHERE {
?dataset a qb:DataSet ; dcterms:title ?datasetTitle
BIND("1" AS ?source)
}
ORDER BY LCASE(?datasetTitle)
}}
@csarven
csarven / inbox.html
Last active December 19, 2015 12:18
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="utf-8" />
<title>Inbox timeline</title>
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<link rel="stylesheet" href="css/style.css" />
</head>
<body>
@csarven
csarven / NoOptimizer.java
Last active December 17, 2015 18:59
Activating Optimize.noOptimizer() for Fuseki
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@csarven
csarven / gist:5657055
Created May 27, 2013 13:29
Apache LogFormat in RDF Turtle
LogFormat "[\
a http:Request;\
:referrer \"%{Referer}i\";\
:useragent \"%{User-agent}i\";\
:remotehost \"%h\";\
:remotehostip \"%a\";\
:remoteuser \"%u\";\
time:inXSDDateTime \"%{%Y-%m-%dT%T%z}t\";\
:canonicalservername \"%v\";\
:querystring \"%q\";\