Skip to content

Instantly share code, notes, and snippets.

View tpluscode's full-sized avatar

Tomasz Pluskiewicz tpluscode

View GitHub Profile
@tpluscode
tpluscode / Sample.tt
Last active August 9, 2021 07:45
OWL => C# T4 template
<# // Create exact file grouped with your OWL/XML file. See example below of csproj structure #>
<#@ assembly name="System.Core" #>
<#@ assembly name="System.Xml" #>
<#@ import namespace="System.Xml" #>
<#@ include file="Vocabulary.tt" #><#
CreateVocabulary();
#>
@tpluscode
tpluscode / .gitignore
Last active April 24, 2017 16:03
Example of Web Component Tester with bound fixture
bower_components/
using System;
using Anotar.Custom;
namespace IsXEnabledRepro
{
internal class Program
{
private static void Main()
{
LogTo.Debug("I shouldn't fail");
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';
@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" />
public sealed class TestModule : NancyModule
{
public TestModule()
{
After += ReturnNotFoundIfNull;
Get("/", _ => Action());
// worked with 1.x
// Get["/"] = _ => Action();
@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>
@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;
}
node_modules/
dist/
@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.