Skip to content

Instantly share code, notes, and snippets.

View tpluscode's full-sized avatar

Tomasz Pluskiewicz tpluscode

View GitHub Profile
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");
@tpluscode
tpluscode / .gitignore
Last active April 24, 2017 16:03
Example of Web Component Tester with bound fixture
bower_components/
@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();
#>