Skip to content

Instantly share code, notes, and snippets.

View tpluscode's full-sized avatar

Tomasz Pluskiewicz tpluscode

View GitHub Profile
@tpluscode
tpluscode / package.json
Created May 23, 2022 14:16
ts-node+mocha+esm+@types
{
"name": "mocha-ts-node",
"type": "module",
"scripts": {
"test": "mocha test.ts"
},
"dependencies": {
"@rdfjs/term-set": "2.0.1",
"@types/mocha": "9.1.1",
"@types/rdfjs__term-set": "2.0.0",
@tpluscode
tpluscode / tui-editor.js
Created June 24, 2022 11:44
lit-tui-editor
import { css, html, LitElement, unsafeCSS } from 'lit'
import { customElement, property } from 'lit/decorators.js'
import Editor from '@toast-ui/editor'
import styles from '@toast-ui/editor/dist/toastui-editor.css'
@customElement('tui-markdown')
export class TuiMarkdown extends LitElement {
@property({ type: String })
public value: string | undefined = ''
@tpluscode
tpluscode / .gitignore
Last active March 20, 2023 10:36
import default - node16
node_modules
@tpluscode
tpluscode / book.ttl
Last active September 21, 2023 11:56
SHACL-UI view layout concepts
<book/a-macska-es-a-puding>
a schema:Book ;
schema:title "A Macska és a puding" ;
schema:author [ schema:givenName "Biljana" ; schema:familyName "Nikolic" ] ;
schema:associatedMedia [
schema:contentUrl <book/a-macska-es-a-puding.pdf> ;
] ;
schema:image [
a schema:ImageObject ;
schema:contentUrl <large-cover> ;
@tpluscode
tpluscode / cas-context.json
Last active February 26, 2024 21:25
Converting CSS from INCEpTION to RDF
{
"@vocab": "urn:cas:",
"element": {
"@id": "element",
"@container": "@set",
"@type": "@id"
},
"__Entity": {
"@id": "urn:cas:entity",
"@type": "@id"
@tpluscode
tpluscode / .eslintrc.json
Created March 18, 2024 16:59
lit/no-classfield-shadowing
{
"extends": [
"@open-wc/eslint-config",
"@tpluscode"
],
"env": {
"browser": true
},
"parserOptions": {
"project": "./tsconfig.json"
@tpluscode
tpluscode / get-resource.n3
Last active January 21, 2025 08:00
API Tun3r
# Get response from a GET request
[
http:absolutePath "/things" ;
http:method http-methods:GET ;
http:header ( "accept" "text/turtle" ) ;
] http:resp ?res .
# Check OK response and
{
?res http:status http:OK ;
@tpluscode
tpluscode / README.md
Last active January 24, 2025 17:15
n3 rule runs twice
eye test.n3 files.n3 rules.n3
@tpluscode
tpluscode / README.md
Last active April 16, 2025 08:41
eye issue #148

Run

eye --nope --quiet --pass-only-new *.n3

Expected output

</req.n3#withResourcePath> earl:outcome earl:passed.
</req.n3#withoutResourcePath> earl:outcome earl:passed.
 earl:outcome earl:passed.