Skip to content

Instantly share code, notes, and snippets.

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 Oct 12, 2021
types/mdx/index.d.ts
View index.d.ts
// Type definitions for non-npm package mdx 2.0
// Project: https://github.com/mdx-js/mdx
// Definitions by: Christian Murphy <https://github.com/ChristianMurphy>
// Remco Haszing <https://github.com/remcohaszing>
// Titus Wormer <https://github.com/wooorm>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.9
type FunctionComponent<Props> = (props: Props) => JSX.Element;
type ClassComponent<Props> = new (props: Props) => JSX.ElementClass;
View libmime.d.ts
export class Libmime {
constructor(config: any);
config: any;
/**
* Checks if a value is plaintext string (uses only printable 7bit chars)
*
* @param {String} value String to be tested
* @returns {Boolean} true if it is a plaintext string
*/
isPlainText(value: string): boolean;
@peterblazejewicz
peterblazejewicz / gitflow-breakdown.md
Created Nov 19, 2020 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.
View gitflow-breakdown.md

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@peterblazejewicz
peterblazejewicz / sample.py
Created Apr 19, 2020
asyncio.Queue to process SenseHat keyboard events in asynchronous event loop
View sample.py
#!/usr/bin/python
import asyncio
from sense_hat import SenseHat
sense: SenseHat = None
loop: asyncio.AbstractEventLoop = None
queue: asyncio.Queue = None
def process_direction(event):
View index.d.ts
// 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
View index.d.ts
// 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
View index.d.ts
// 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";
View render-component.cs
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", "/");
View component-parsed.razor
#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;