This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"name": "Erik", | |
"surname": "Perez", | |
"address": { | |
"country": "BJ", | |
"city": "Gekavenu", | |
"street": "Icni Square" | |
}, | |
"birth": "1970-08-27T08:41:30.587Z", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.List; | |
import java.util.Scanner; | |
import java.util.Stack; | |
// Troche pozmienialem nazwy metod/interfejsow ale poza tym to struktura prawie taka sama | |
// Dziala troche jak reverse polish notation (op popuje argumenty ze stacku i wrzuca result na stack) | |
class Main { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;(async () => { | |
console.info('Type stop() to stop.') | |
const sleep = (ms) => new Promise((res) => setTimeout(res, ms)); | |
const msgSelector = ".j83agx80.jwdofwj8.pby63qed"; | |
const msgTextSelector = ".oo9gr5id[dir=auto]"; | |
const msgAuthorSelector = ".pfnyh3mw.r9r71o1u.m9osqain.fsrhnwul.dkr8dfph"; | |
const scrollableSelector = | |
".buofh1pr.j83agx80.eg9m0zos.ni8dbmo4.cbu4d94t.gok29vw1"; | |
const msgContainerSelector = '[aria-label=Messages]'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { css } from "@emotion/react"; | |
import styled from "@emotion/styled"; | |
export const breakpoints = { | |
xs: 0, | |
sm: 460, | |
md: 820, | |
lg: 1350, | |
xl: 1880, | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const iif = <PROPS extends unknown, PROP_NAME extends keyof PROPS>( | |
prop: PROP_NAME, | |
val?: PROPS[PROP_NAME] | |
) => (propsInner: PROPS) => { | |
if (val !== undefined) return propsInner[prop] === val ? "&" : "&.__NEVER"; | |
return propsInner[prop] ? "&" : "&.__NEVER"; | |
}; | |
export const variant = <PROPS extends unknown>( | |
prop: PROPS[keyof PROPS], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable react-hooks/rules-of-hooks */ | |
import {useLayoutEffect, useState} from "react"; | |
export const firstToUppercase = (string: string) => | |
string.charAt(0).toUpperCase() + string.slice(1); | |
export const breakpoints = { | |
xs: 0, | |
sm: 600, | |
md: 960, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html { | |
font-size: max(8px, calc(8 / 1440 * 100vw)); | |
font-family: 'Poppins', sans-serif; | |
line-height: 1; | |
letter-spacing: 0.02rem; | |
} | |
body { | |
font-size: max(18px, calc(18 / 1440 * 100vw)); | |
margin: 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getScrollbarWidth() { | |
const outer = document.createElement('div'); | |
outer.style.visibility = 'hidden'; | |
outer.style.overflow = 'scroll'; | |
document.body.appendChild(outer); | |
const inner = document.createElement('div'); | |
outer.appendChild(inner); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {useEffect, useState} from "react"; | |
import {firstToUppercase} from "../utils/js"; | |
export const breakpoints = { | |
xs: "0px", | |
sm: "600px", | |
md: "960px", | |
lg: "1280px", | |
xl: "1920px", | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const breakpoints = { | |
xs: "0px", | |
sm: "600px", | |
md: "960px", | |
lg: "1280px", | |
xl: "1920px" | |
}; | |
export const query = Object.entries(breakpoints).reduce( | |
(acc, [breakpoint, value]) => { |
NewerOlder