Skip to content

Instantly share code, notes, and snippets.

View melvincarvalho's full-sized avatar
💭
I may be slow to respond.

Melvin Carvalho melvincarvalho

💭
I may be slow to respond.
View GitHub Profile
$.ajax({
url: 'https://silverbucket.rww.io/profile/card',
contentType: "application/sparql-update",
type: 'PATCH',
data: 'INSERT DATA { <https://silverbucket.rww.io/profile/card#me> <http://xmlns.com/foaf/0.1/knows> <http://melvincarvalho.com/#me> . } ',
success: function(result) {
}
});
@melvincarvalho
melvincarvalho / cert.n3
Last active August 29, 2015 14:17
cert.n3 with private key (domel)
@base <http://www.w3.org/ns/auth/cert> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix wot: <http://xmlns.com/wot/0.1/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix vs: <http://www.w3.org/2003/06/sw-vocab-status/ns#> .
@prefix dc: <http://purl.org/dc/terms/>.
/put https://localhost/d/user/5edbedfea2005c9feca6c014a6d8b2237d1e54c4113155621e2d7ecb7427c42b/2
<> a <https://w3id.org/cc#Credit> ;
<https://w3id.org/cc#source> <http://melvincarvalho.com/#me> ;
<https://w3id.org/cc#destination> <http://bblfish.net/people/henry/card#me> ;
<https://w3id.org/cc#amount> "1" ;
<https://w3id.org/cc#currency> <https://w3id.org/cc#bit> .
<!doctype html>
<html lang="en">
<head>
<title>Test LDPC Websocket</title>
</head>
<body>
*** Error in `/tmp/go-build391213453/command-line-arguments/_obj/exe/daemon': double free or corruption (fasttop): 0x000000000212cfb0 ***
SIGABRT: abort
PC=0x7fbaa57eb267
signal arrived during cgo execution
goroutine 16 [syscall, locked to thread]:
runtime.cgocall_errno(0x4036e0, 0xc20814bb18, 0xc200000000)
/home/melvin/dev/go/src/runtime/cgocall.go:130 +0xf5 fp=0xc20814baf8 sp=0xc20814bad0
github.com/presbrey/goraptor._Cfunc_raptor_free_world(0x212d8e0)
/home/melvin/go/src/github.com/presbrey/goraptor/:136 +0x45 fp=0xc20814bb18 sp=0xc20814baf8
DEL=$(2>/dev/null curl -I -X POST -k "$UPDATE1" | grep Location: | sed 's/.* \(.*\)/\1/' | dos2unix )
curl -X DELETE -k $DEL
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
<>
<http://purl.org/dc/terms/created> "1433020643390"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
<http://rdfs.org/sioc/ns#has_member> <#user_0>, <#user_1>, <#user_2> ;
a <http://rdfs.org/sioc/ns#Usergroup> .
<#channel_0_0>
<http://purl.org/dc/terms/title> "Main" ;
<http://rdfs.org/sioc/ns#has_subscriber> <http://melvincarvalho.com/#me> ;
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
<#0>
a <http://www.w3.org/ns/auth/acl#Authorization> ;
<http://www.w3.org/ns/auth/acl#accessTo> <test> ;
<http://www.w3.org/ns/auth/acl#agentClass> <http://xmlns.com/foaf/0.1/Agent> ;
<http://www.w3.org/ns/auth/acl#mode> <http://www.w3.org/ns/auth/acl#Read> .
<#1>
a <http://www.w3.org/ns/auth/acl#Authorization> ;
var WebSocket = require('ws');
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
var ws = new WebSocket('wss://databox.me/');
ws.on('open', function open() {
console.log('connected');
ws.send('ping');
});
curl -H "Content-Type: application/sparql-update" -X PATCH -d 'INSERT DATA { <#1> <http://www.w3.org/ns/auth/acl#agent> <http://melvincarvalho.com/#me> . } ' uri,acl