Skip to content

Instantly share code, notes, and snippets.

View aldonline's full-sized avatar

Aldo Bucchi aldonline

  • Decoupled Inc
  • San Francisco - Bay Area
View GitHub Profile
@aldonline
aldonline / gist:6958973
Last active December 25, 2015 10:09
GET RDF triples from graph.facebook.com
# triples for a given entity
curl -H "Accept: text/turtle" -X GET "https://graph.facebook.com/aldo.bucchi"
# with metadata ( triples for properties / schema )
curl -H "Accept: text/turtle" -X GET "https://graph.facebook.com/aldo.bucchi?metadata=1"
# of course you can pass an access token to gain access to a broader piece of the graph
curl -H "Accept: text/turtle" -X GET "https://graph.facebook.com/aldo.bucchi&access_token=TOKEN"
# to get a fresh ( but short lived ) token browse to:
@aldonline
aldonline / gist:4410275
Last active December 10, 2015 08:48
Implicit Scala to RDF Value conversions
object rdfStringOps {
import org.openrdf.model._
private lazy val vf = impl.ValueFactoryImpl.getInstance
implicit class RDFStringOps( val str:String ){
def uri = vf createURI str
def lit = vf createLiteral str
@aldonline
aldonline / _.md
Created October 27, 2012 18:15
just another inlet to tributary