This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $rdf = require('rdflib'); | |
| var CHAT = $rdf.Namespace("https://ns.rww.io/chat#"); | |
| var CURR = $rdf.Namespace("https://w3id.org/cc#"); | |
| var DCT = $rdf.Namespace("http://purl.org/dc/terms/"); | |
| var FACE = $rdf.Namespace("https://graph.facebook.com/schema/~/"); | |
| var FOAF = $rdf.Namespace("http://xmlns.com/foaf/0.1/"); | |
| var LIKE = $rdf.Namespace("http://ontologi.es/like#"); | |
| var LDP = $rdf.Namespace("http://www.w3.org/ns/ldp#"); | |
| var MBLOG = $rdf.Namespace("http://www.w3.org/ns/mblog#"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Differences between JRD and RDF data models: | |
| 1. Each document can have at most one subject per document. | |
| 2. Although the subject is optional in JRD, bnodes are not explicitly covered. | |
| 3. There are three named objects associated with a subject, links (analogous to predicate / URI pairs) and properties (analagous to predicate / literal pairs), aliases (much like owl : sameAs) | |
| 4. The literals are restricted to string and null (RDF uses the xsd types) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | |
| <#this> | |
| a <https://w3id.org/cc#Credit> ; | |
| <https://w3id.org/cc#amount> 100 ; | |
| <https://w3id.org/cc#currency> <https://w3id.org/cc#bit> ; | |
| <https://w3id.org/cc#destination> <http://melvincarvalho.com/#me> ; | |
| <https://w3id.org/cc#source> <https://workbot.databox.me/profile/card#me> . | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var leftPosition, topPosition; | |
| var width = 1024; | |
| var height = 600; //Allow for borders. | |
| leftPosition = (window.screen.width / 2) - ((width / 2) + 10); //Allow for title and status bars. | |
| topPosition = (window.screen.height / 2) - ((height / 2) + 50); | |
| window.open(https://solid.github.io/solid-idps/?origin="+encodeURIComponent(window.location.href), "Solid signup", "resizable,scrollbars,status,width="+width+",height="+height+",left="+ leftPosition + ",top=" + topPosition); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * create a post in turtle | |
| * @param {string} webid the creator | |
| * @param {string} message the message to send | |
| * @param {string} application application that created it | |
| * @param {string} img img for that post | |
| * @return {string} the message in turtle | |
| */ | |
| function createPost(webid, message, application, img) { | |
| var turtle; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .dump | grep -v "BEGIN TRANSACTION;" | grep -v "PRAGMA" | grep -v "COMMIT;" | perl -pe 's/INSERT INTO \"(.*)\" VALUES/INSERT INTO `\1` VALUES/' | mysql inartes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for post in $(for i in $(rdf ls $TIME/) ; do rdf ls $i ; done) ; do curl -X PATCH -H "Content-type: application/sparql-update" -d "INSERT DATA { <#this> <http://www.w3.org/ns/solid/terms#timeline> <$TIME/> }" $post ; sleep 1 ; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * init RDF knowledge base | |
| */ | |
| $scope.initRDF = function() { | |
| var PROXY = "https://databox.me/,proxy?uri={uri}"; | |
| //var AUTH_PROXY = "https://rww.io/auth-proxy?uri="; | |
| var TIMEOUT = 60000; | |
| $rdf.Fetcher.crossSiteProxyTemplate=PROXY; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| a = __scope.easy.sort(function(a,b){ return a<b ? -1 : 1; }) | |
| str = '' ; for (var i=1; i<=2000; i++) { if(a.indexOf(i) === -1) str += (i + ' ' + __scope.getPair(i).cs + ' ' + __scope.getPair(i).en + '\n' ); } ; console.log(str); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "post_tweet_hook": "sleep 1 ; curl -H \"Content-Type: text/plain; charset=UTF-8\" --cert $CERT --key $CERT -X PUT --data-binary @/home/melvin/twtxt.txt https://melvin.databox.me/Public/twtxt/twtxt.txt", | |
| "user": "melvincarvalho", | |
| "twtfile": "/home/melvin/twtxt.txt", | |
| "limit_timeline": "20", | |
| "following": [ | |
| { | |
| "user": "twtxt", | |
| "uri": "https://buckket.org/twtxt_news.txt" | |
| } |