Skip to content

Instantly share code, notes, and snippets.

View tpluscode's full-sized avatar

Tomasz Pluskiewicz tpluscode

View GitHub Profile
@tpluscode
tpluscode / initialise.ru
Last active September 11, 2019 17:35
API Days demo
PREFIX dataCube: <https://rdf-cube-curation.described.at/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
INSERT DATA {
GRAPH <http://localhost:5678/project/apidays> {
<http://localhost:5678/project/apidays>
a dataCube:Project ;
<http://schema.org/name> "Fact table project" .
}
}
@tpluscode
tpluscode / highlighting.iro
Last active November 15, 2023 15:50
Hypertest code coloring
#################################################################
## Iro
################################################################
##
## * Press Ctrl + '+'/'-' To Zoom in
## * Press Ctrl + S to save and recalculate...
## * Documents are saved to web storage.
## * Only one save slot supported.
## * Matches cannot span lines.
## * Unicode chars must be defined in \u0000 to \uffff format.
@tpluscode
tpluscode / coverage.md
Last active June 20, 2019 07:06
Draft of Hydra API testing tool

Coverage

There could be two separate coverage metrics.

Representation metrics

To verify the contents of resources

I'm not so sure about, but any verification like Expect property xyz (value) could increase this metric.

node_modules/
dist/
@tpluscode
tpluscode / CommentHeaderWriter.cs
Created November 11, 2017 11:46
Prepending a comment before serialized RDF
public class CommentHeaderWriter : BaseRdfWriter
{
private readonly IRdfWriter inner;
private readonly string header;
public CommentHeaderWriter(IRdfWriter writer, string header)
{
this.inner = writer;
this.header = header;
}
@tpluscode
tpluscode / index.html
Created August 28, 2017 19:19
Importing and stamping templates with ES6 and lit-html
<!DOCTYPE html>
<html lang="en">
<body>
<vanilla-lit tagline="Luke"></vanilla-lit>
<script src="bundle.js"></script>
</body>
</html>
public sealed class TestModule : NancyModule
{
public TestModule()
{
After += ReturnNotFoundIfNull;
Get("/", _ => Action());
// worked with 1.x
// Get["/"] = _ => Action();
@tpluscode
tpluscode / Library.ruleset
Last active November 22, 2016 22:37
StyleCop Analyzer rules
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="tpluscode default rules" Description="Code analysis rules for general project" ToolsVersion="14.0">
<Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
<Rule Id="CA1001" Action="Warning" />
<Rule Id="CA1009" Action="Warning" />
<Rule Id="CA1016" Action="Warning" />
<Rule Id="CA1033" Action="Warning" />
<Rule Id="CA1049" Action="Warning" />
<Rule Id="CA1060" Action="Warning" />
<Rule Id="CA1061" Action="Warning" />
export var jsonLdObject = {
'@context': 'http://schema.org/',
'@id': 'http://example.com/tpluscode',
'@type': 'Person',
givenName: 'Tomasz'
};
export class JsonLdResource {
get '@context'() {
return 'http://schema.org';
using System;
using Anotar.Custom;
namespace IsXEnabledRepro
{
internal class Program
{
private static void Main()
{
LogTo.Debug("I shouldn't fail");