Skip to content

Instantly share code, notes, and snippets.

View peterblazejewicz's full-sized avatar
:octocat:
@code #remote #ssh #raspberrypi

Piotr Błażejewicz (Peter Blazejewicz) peterblazejewicz

:octocat:
@code #remote #ssh #raspberrypi
View GitHub Profile
@peterblazejewicz
peterblazejewicz / index.d.ts
Created February 29, 2020 21:01
OpenSeadragon
// Type definitions for OpenSeadragon 2.4
// Project: https://openseadragon.github.io/
// Definitions by: Álvaro Martínez <https://github.com/alvaromartmart>
// RobertYost <https://github.com/RobertYost>
// Jasper Staab <https://github.com/jstaab>
// Kristin Ruben <https://github.com/kristinruben>
// Geoff Harper <https://github.com/geoff-harper>
// Justin <https://github.com/justincy>
// Definitions: https://github.com/alvaromartmart/types-openseadragon
// TypeScript Version: 3.1
// This contains sample code which tests the typings. This code does not run, but it is type-checked.
import * as one from "onecolor";
import onecolor = require("onecolor");
one.color('#a9d91d') // Regular hex syntax
// Contrustor
@peterblazejewicz
peterblazejewicz / index.d.ts
Created December 30, 2019 09:24
serve-static
// Type definitions for serve-static 1.13
// Project: https://github.com/expressjs/serve-static
// Definitions by: Uros Smolnik <https://github.com/urossmolnik>
// Linus Unnebäck <https://github.com/LinusU>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
/* =================== USAGE ===================
import * as serveStatic from "serve-static";
protected override void BuildRenderTree(RenderTreeBuilder builder)
{
base.BuildRenderTree(builder);
builder.OpenElement(0, "nav");
builder.AddAttribute(1, "class", "menu");
builder.OpenElement(2, "ul");
builder.OpenElement(3, "li");
builder.OpenComponent<NavLink>(4);
builder.AddAttribute(5, "href", "/");
#pragma checksum "Counter.razor" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "d4fabfd6e6d002e957b53fad126e1419708789b9"
// <auto-generated/>
#pragma warning disable 1591
namespace WebApplication1.Pages
{
#line hidden
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
@peterblazejewicz
peterblazejewicz / poc.diff
Created October 7, 2019 21:26
Tabset nav position PoC
diff --git a/demo/src/app/components/tabset/tabset.module.ts b/demo/src/app/components/tabset/tabset.module.ts
index 3206e7a..4f1b23b 100644
--- a/demo/src/app/components/tabset/tabset.module.ts
+++ b/demo/src/app/components/tabset/tabset.module.ts
@@ -13,6 +13,8 @@ import { NgbdTabsetJustify } from './demos/justify/tabset-justify';
import { NgbdTabsetJustifyModule } from './demos/justify/tabset-justify.module';
import { NgbdTabsetOrientation } from './demos/orientation/tabset-orientation';
import { NgbdTabsetOrientationModule } from './demos/orientation/tabset-orientation.module';
+import { NgbdTabsetPosition } from './demos/position/tabset-position';
+import { NgbdTabsetPositionModule } from './demos/position/tabset-position.module';
@peterblazejewicz
peterblazejewicz / convert.interceptor.ts
Created July 6, 2019 17:12
camel case convert interceptor
import { Injectable } from '@angular/core';
import {
HttpEvent,
HttpRequest,
HttpHandler,
HttpInterceptor,
HttpResponse
} from '@angular/common/http';
import { Observable, of } from 'rxjs';
import { camelCase, mapKeys } from 'lodash';
@peterblazejewicz
peterblazejewicz / app-component.strings.ts
Created June 24, 2019 22:03
Decorator overriding properties
import { stringResourceFile } from 'src/decorators/string-resource-file.decorator';
import { environment } from 'src/environments/environment';
@stringResourceFile(environment.production)
export class AppComponentStrings {
title = 'RESOURCE{{file}:{key}:{Hello World}}';
description = 'RESOURCE{{file}:{key}:{Hello World Description}}';
}
@peterblazejewicz
peterblazejewicz / components.js
Created June 13, 2019 05:56
AngularJS > Angular upgrade directive/component supported definitions
angular
.module('myApp')
.component('myProfile', {
template: `<h2>{{$ctrl.person.firstName}} details!</h2>
<div><label>id: </label>{{$ctrl.person.lastName}}</div>
<button ng-click="$ctrl.onDelete()">Delete</button>`,
bindings: {
person: '<',
deleted: '&'
},