Skip to content

Instantly share code, notes, and snippets.

View itsmikita's full-sized avatar
💭
Jemanden passiert etwas

It's Mikita itsmikita

💭
Jemanden passiert etwas
View GitHub Profile
@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 April 29, 2025 19:25
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 May 5, 2025 21:49
Boot Camp Assistant - Enabling creation of bootable USB disks for installing Windows
@Jobbies
Jobbies / css-colors.json
Last active February 13, 2024 17:07
CSS Colors json
{
"aliceblue": "#f0f8ff",
"antiquewhite": "#faebd7",
"aqua": "#00ffff",
"aquamarine": "#7fffd4",
"azure": "#f0ffff",
"beige": "#f5f5dc",
"bisque": "#ffe4c4",
"black": "#000000",
"blanchedalmond": "#ffebcd",
/* simplemover
*
* By: A simple routine to move every 4th LED up the strip and fade behind.
*
* No delay statements were harmed in the creation of this routine.
*
* By: Andrew Tuline
*
* Date: June 11, 2018
*
@dannygsmith
dannygsmith / valet-plus-destroy
Last active July 18, 2023 09:07
Remove valet-plus - reboot required
#!/usr/bin/env bash
#styles
VP_NONE='\033[00m'
VP_RED='\033[01;31m'
VP_GREEN='\033[01;32m'
VP_YELLOW='\033[01;33m'
VP_PURPLE='\033[01;35m'
VP_CYAN='\033[01;36m'
VP_WHITE='\033[01;37m'
@jamieweavis
jamieweavis / macos-app-icon.md
Last active April 24, 2025 07:01
How to create an .icns macOS app icon
byte character[8]={0x24, 0x24, 0x24, 0xa5, 0x81, 0x81, 0x7e, 0x0};
uint8_t colPins[8]={ 2, 3, 4, 5, 6, 7, 8, 9};
#define SER_PIN 10
#define SCK_PIN 11
#define RCK_PIN 12
void setup() {
// Turn everything to low
@djha-skin
djha-skin / png2icns
Created December 21, 2016 19:19
Convert PNG file to ICNS file
# Stolen from here: http://stackoverflow.com/a/20703594/850326
#!/bin/sh
export POSIXLY_CORRECT=1
if [ -z "${1}" -o -z "${2}" ]
then
echo "Usage: ${0} <name> <original-png-location>"
fi
name=$1