Skip to content

Instantly share code, notes, and snippets.

View PhoneDroid's full-sized avatar
๐Ÿชซ

แดฉสœแดษดแด‡แด…ส€แดษชแด… PhoneDroid

๐Ÿชซ
View GitHub Profile
@PhoneDroid
PhoneDroid / README.md
Created April 19, 2023 09:15
CSS Parent with X children
.Parent:has( *:first-child:nth-last-child( <Count> ) ){}
@PhoneDroid
PhoneDroid / README.md
Created April 19, 2023 09:20
Shopify liquid stylesheet snippet
{%- liquid

    #
    #   Stylesheet Tag
    #

    #
 # Imports:

Profile Manager

Navigate to your browsers profile manager,
simply type the following in the url bar:

about:profiles
const { fetch } = window
    
window.fetch = async ( ... args ) => {

    let [ url , config ] = args

    console.log('Fetching',url,config)
| newline_to_br | split : '<br />'
{%- assign parts = string | newline_to_br | split : '<br />' -%}
query Input {

    cart {

        lines {

            attribute ( key : "Testing" ) {
 value

Partials

Makes a given union of keys partial.


type Partials < Type , Keys extends keyof Type = keyof Type > = 
 &amp; Partial&gt; 

The correct way to ignore a folder seems to be:

Source/

The following didn't work:

Curtesy to vyenkv answer.

type LengthOf <
    String extends string ,
    Sum extends 0 [] = []
> = String extends `${ string }${ infer $Rest }`
    ? LengthOf< $Rest , [ ... Sum , 0 ] >
 : Sum[ 'length' ]
export { toBold }


function toBold ( value : string ){
    return value
        .split('')
        .map(( char ) => Characters[ char ] ?? char )
        .join('')