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
| if (preg_match('/^post$/i', $_SERVER['REQUEST_METHOD'])) | |
| { | |
| // logger('/home/foaf/www/datawiki/post.log', $webid, $username); | |
| include_once('arc/ARC2.php'); | |
| /* configuration */ | |
| $config = array( | |
| // no config needed for now | |
| ); |
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
| if (preg_match('/^post$/i', $_SERVER['REQUEST_METHOD'])) | |
| { | |
| // logger('/home/foaf/www/datawiki/post.log', $webid, $username); | |
| include_once('arc/ARC2.php'); | |
| /* configuration */ | |
| $config = array( | |
| // no config needed for now | |
| ); |
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().databank.dump({format:'application/rdf+xml', serialize: true}) |
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
| rapper -i rss-tag-soup -o rdfxml "http://twitter.com/statuses/user_timeline/14208503.rss" | roqet -D /dev/stdin -e "SELECT DISTINCT ?p WHERE { ?s ?p ?o }" |
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
| 2>/dev/null curl http://esw.w3.org/SparqlEndpoints | grep -A6 '^<tr>$' | awk '{ i++ ; if (i==3 ) print $0 " ." ; if (i==1) print "\n<#endpoint" p++ ">\n" $0 " ;" ; if ( $1 == "<tr>" ) i = 0; }' | sed 's/<td> <b>/<dct:description> /' | sed 's/<.td><td>/<void:sparqlEndpoint> /' | sed 's/<void.*href="\([^"]*\).*/<void:sparqlEndpoint> <\1> ./' | sed 's/<dct:description>.*">\(.*\)<.a.*/<dct:description> "\1" ;/' |
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
| <?php | |
| function getAuthFromDelegatedFOAFSSL() { | |
| /* | |
| * Settings for the IdP. The following two variables may change with | |
| * another IdP. | |
| */ | |
| $sigalg = "rsa-sha1"; | |
| $idp_certificate = "foafssl.org-cert.pem"; | |
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
| git clone git://github.com/melvincarvalho/libAuthentication.git | |
| cat > index.php | |
| <?php | |
| require_once('libAuthentication/lib/Authentication.php'); | |
| $auth = new Authentication_FoafSSLDelegate(); | |
| if (!$auth->isAuthenticated()) { ?> |
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
| Run the following commands from a shell to be up and running with a FOAF+SSL service. No external libraries or configuration is required. | |
| Nor is HTTPS required. If you are not running on localhost, replace that with the name of your server. | |
| git clone git://github.com/melvincarvalho/libAuthentication.git | |
| cat > index.php | |
| <?php | |
| require_once('libAuthentication/lib/Authentication.php'); |
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
| xhr = new XMLHttpRequest(); | |
| xhr.open('PUT', 'https://melvincarvalho.data.fm/test5', false); | |
| xhr.setRequestHeader('Content-Type', 'text/turtle; charset=UTF-8'); | |
| xhr.send('@prefix rdf: <http://www.w3.org/1999/02/22/rdf-syntax-ns#>.\n\n<#a> <#b> <#c>.'); |
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
| <#Default> | |
| <http://www.w3.org/ns/auth/acl#agentClass> <http://xmlns.com/foaf/0.1/Agent> ; | |
| <http://www.w3.org/ns/auth/acl#accessTo> <http://data.melvin.me> ; | |
| <http://www.w3.org/ns/auth/acl#defaultForNew> <http://data.melvin.me> ; | |
| <http://www.w3.org/ns/auth/acl#mode> <http://www.w3.org/ns/auth/acl#Read>, <http://www.w3.org/ns/auth/acl#Write> . | |
OlderNewer