Skip to content

Instantly share code, notes, and snippets.

View bblfish's full-sized avatar

Henry Story bblfish

View GitHub Profile
package net.bblfish.test
import japgolly.scalajs.react._
import japgolly.scalajs.react.vdom.ReactVDom._
import japgolly.scalajs.react.vdom.ReactVDom.all._
import net.bblfish.test.hlistaux.SelectNOrder
import org.scalajs.dom.{Node, document}
import shapeless.PolyDefns._
import shapeless._
import shapeless.ops.hlist.Mapper
$ openssl pkcs12 -clcerts -nokeys -in ~/Certificates.p12 | openssl x509
Enter Import Password:
MAC verified OK
-----BEGIN CERTIFICATE-----
MIIDITCCAgmgAwIBAgIGAUwZZ+oFMA0GCSqGSIb3DQEBBQUAMB0xDjAMBgNVBAMM
BVdlYklEMQswCQYDVQQKDAJ7fTAeFw0xNTAzMTQxNzM5NDJaFw0xOTAzMTMxNzQ5
NDJaMBwxGjAYBgNVBC4TEWhlbnJ5QGJibGZpc2gubmV0MIIBIDALBgkqhkiG9w0B
AQEDggEPADCCAQoCggEBANq50elB9vhaCGMWnQ22Mo0dShWnHf/j1PTQh1KlL7FF
TXNY5KXs81AeOSS8AlLzAEsLshoNa2TKBT8PvLWlTsk+vi3JuR5MQyuCeITEzCrY
oQK0bSogF79F2dTIilZNQgI0SEobLkRtu0zUOOecJGbOMQ8yd3OnedJO17YKBaYY
@bblfish
bblfish / WebFetcher
Created January 29, 2012 22:44
Starting to play with writing a RDF client using the async-http-client https://github.com/ning/async-http-client
package org.w3c.readwriteweb.cache
import com.ning.http.client.AsyncHandler.STATE
import com.ning.http.client.AsyncHandler
import com.ning.http.client.AsyncHttpClient
import com.ning.http.client.HttpResponseBodyPart
import com.ning.http.client.HttpResponseHeaders
import com.ning.http.client.HttpResponseStatus
import com.ning.http.client.Response
@bblfish
bblfish / WebFetcher
Created January 30, 2012 12:54
This shows how one should be able to use Jena readers (re issue JENA-203) https://issues.apache.org/jira/browse/JENA-203 but in fact this throws an exception ERROR (WebFetcher.scala:59) : org.xml.sax.SAXParseException; systemId: http://bblfish.net/people
/*
* Copyright (c) 2012 Henry Story (bblfish.net)
* under the MIT licence defined at
* http://www.opensource.org/licenses/mit-license.html
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in the
* Software without restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so, subject to the
@bblfish
bblfish / AsyncJenaParser
Created January 31, 2012 22:23
Work on adapting on Jena's StAX2SAX to non blocking parser
/*
* 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
@bblfish
bblfish / WebFetcher
Created January 31, 2012 23:07
An test to start fetching content asynchronously using the aalto parser.
/*
* Copyright (c) 2012 Henry Story (bblfish.net)
* under the MIT licence defined at
* http://www.opensource.org/licenses/mit-license.html
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in the
* Software without restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so, subject to the
@bblfish
bblfish / gist:1780147
Created February 9, 2012 14:00
pimp my rdf
package org.w3.rdf
import org.w3.algebraic._
trait Module {
val xsdString = IRI("http://www.w3.org/2001/XMLSchema#string")
val rdfLangString = IRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString")
trait GraphInterface extends Iterable[Triple] { self =>
package org.w3.rdf
import org.w3.algebraic._
trait Module {
val xsdString = IRI("http://www.w3.org/2001/XMLSchema#string")
val rdfLangString = IRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString")
trait GraphInterface extends Iterable[Triple] { self =>
@bblfish
bblfish / gist:1780802
Created February 9, 2012 16:00
RDF with simple IRI model
package org.w3.rdf
import org.w3.algebraic._
trait Module {
val xsdString = IRI("http://www.w3.org/2001/XMLSchema#string")
val rdfLangString = IRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString")
trait GraphInterface extends Iterable[Triple] { self =>
@bblfish
bblfish / gist:1870493
Created February 20, 2012 18:24
Nomo Turtle recurion issue - (see PN_PREFIX_1, PN_PREFIX_2, ...)
/*
* Copyright (c) 2012 Henry Story
* under the Open Source MIT Licence http://www.opensource.org/licenses/MIT
*/
package org.w3.rdf
import nomo._
import nomo.Errors.{TreeError, Single}
import scala.collection.mutable