Skip to content

Instantly share code, notes, and snippets.

View itsmikita's full-sized avatar
🤡
Psyborg

It's Mikita itsmikita

🤡
Psyborg
View GitHub Profile
/**
* 8x8 monochrome bitmap fonts for rendering
* Author: Daniel Hepper <daniel@hepper.net>
*
* License: Public Domain
*
* Based on:
* // Summary: font8x8.h
* // 8x8 monochrome bitmap fonts for rendering
* //
@cosismo
cosismo / BlinkRGB5050-NodeMCU-ESP-S3-12K.ino
Last active June 16, 2023 17:04
Blink rgb 5050 led AI Thinker NodeMCU-ESP-S3-12K-Kit ESP32S3 ESP32 S3
/* Simple Arduino LED blink example sketch for built-in
RGB 5050 LED on the AI Thinker NodeMCU-ESP-S3-12K-Kit
This example is in the Public Domain
Cosismo IoT | Github: cosismo
*/
#define led_r_pin 5
#define led_g_pin 6
#define led_b_pin 7
// Tag can be string or a function if we parse the functional component
type Tag = string | ((props: any, children: any[]) => JSX.Element);
// Attributes of the element – object or null
type Props = Record<string, string> | null;
// Element children – return value from the h()
type Children = (Node | string)[];
export const h = (tag: Tag, props: Props, ...children: Children) => {
@estruyf
estruyf / vscode-theme-variables.css
Created January 28, 2022 13:21
All VS Code theme variables
:root {
--vscode-font-weight:normal;
--vscode-font-size:13px;
--vscode-editor-font-family:&quot;Operator Mono Lig&quot;, &quot;Cascadia Code&quot;;
--vscode-editor-font-weight:normal;
--vscode-editor-font-size:15px;
--vscode-foreground:#f3eff5;
--vscode-errorForeground:#f48771;
--vscode-descriptionForeground:rgba(243, 239, 245, 0.7);
--vscode-icon-foreground:#c5c5c5;
@getflourish
getflourish / Import CustomElements from .html files.md
Last active February 22, 2024 08:50
Import CustomElements from .html files

Import CustomElements from .html files

This is the technical implementation of the idea and concept described in my article “Why don’t we use HTML to author web components?

Instead of using template literals, constructors and other specifics to define CustomElements, this is a proposal to just use standard HTML to define CustomElements.

The goal is to import CustomElements like this:

@ValeriiVasyliev
ValeriiVasyliev / Woocommerce Javascript events.md
Last active August 17, 2023 11:00
Woocommerce Javascript events

Woocommerce Javascript events
Woocommerce Checkout JS events

$( document.body ).trigger( 'init_checkout' );
$( document.body ).trigger( 'payment_method_selected' );
$( document.body ).trigger( 'update_checkout' );
$( document.body ).trigger( 'updated_checkout' );
$( document.body ).trigger( 'checkout_error' );
$( document.body ).trigger( 'applied_coupon_in_checkout' );
@gugadev
gugadev / ce-pragma.ts
Last active December 2, 2023 07:44
custom-elements-jsx-pragma
import React, { FunctionComponent, ReactChild } from 'react'
const listeners = Symbol('jsx-web-comp/event-listeners')
const eventPattern = /^onEvent/
const toKebabCase = (str: string): string => str.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, '$1-$2').toLowerCase()
export default function jsx (type: string | FunctionComponent, props: Record<string, any>, ...children: ReactChild[]) {
const isCustomElement = customElements.get(type as string)
const newProps = { ...props }
@WebReflection
WebReflection / custom-elements-pattern.md
Last active February 14, 2024 00:13
Handy Custom Elements' Patterns

Handy Custom Elements' Patterns

Ricardo Gomez Angel Photo by Ricardo Gomez Angel on Unsplash

This gist is a collection of common patterns I've personally used here and there with Custom Elements.

These patterns are all basic suggestions that could be improved, enriched, readapted, accordingly with your needs.

@ChrisTollefson
ChrisTollefson / Boot Camp Assistant - USB Install Disk.md
Last active April 6, 2024 16:06
Boot Camp Assistant - Enabling creation of bootable USB disks for installing Windows