Please see: https://github.com/kevinSuttle/html-meta-tags, thanks for the idea @dandv!
Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/
getGitInfo() | |
{ | |
checksum=$(git rev-parse --short HEAD 2> /dev/null) | |
branch=$(git symbolic-ref --short HEAD 2> /dev/null) | |
if [ ! -z $branch ] && [ ! -z $checksum ]; then | |
echo -e " ($branch $checksum)" | |
elif [ ! -z $checksum ]; then | |
echo -e " ($checksum)" | |
elif [ ! -z $branch ]; then | |
echo -e " ($branch)" |
import { findMatchingBrowser, parseAgent } from "./browser_agent_parser/src"; | |
const Safari_iOS_13_a = | |
"Mozilla/5.0 (iPhone; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/83.0.4103.63 Mobile/15E148 Safari/604.1"; | |
const Safari_iOS_13_b = | |
"Mozilla/5.0 (iPad; CPU OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/83.0.4103.63 Mobile/15E148 Safari/604.1"; | |
const Safari_iOS_13_c = | |
"Mozilla/5.0 (iPod; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/83.0.4103.63 Mobile/15E148 Safari/604.1"; | |
const Safari_iOS_13_d = | |
"Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.5 Mobile/15E148 Safari/604.1"; |
import { findMatchingBrowser, parseAgent } from "./browser_agent_parser/src"; | |
const Safari_iOS_13_a = | |
"Mozilla/5.0 (iPhone; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/83.0.4103.63 Mobile/15E148 Safari/604.1"; | |
const Safari_iOS_13_b = | |
"Mozilla/5.0 (iPad; CPU OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/83.0.4103.63 Mobile/15E148 Safari/604.1"; | |
const Safari_iOS_13_c = | |
"Mozilla/5.0 (iPod; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/83.0.4103.63 Mobile/15E148 Safari/604.1"; | |
const Safari_iOS_13_d = | |
"Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.5 Mobile/15E148 Safari/604.1"; |
Thanks to React hooks you have now happily turned all your classes into functional components.
Wait, all your components? Not quite. There is one thing that can still only be implemented using classes: Error boundaries.
There is just no functional equivalent for componentDidCatch
and deriveStateFromError
yet.
export type DeepReadOnly<P> = | |
P extends undefined | null | boolean | string | number | Function | |
? P : | |
P extends Array<infer T> | |
? ReadonlyArray<DeepReadOnly<T>> : | |
P extends Map<infer K, infer V> | |
? ReadonlyMap<DeepReadOnly<K>, DeepReadOnly<V>> : | |
P extends Set<infer M> | |
? ReadonlySet<DeepReadOnly<M>> : | |
{ readonly [K in keyof P]: DeepReadOnly<P[K]> } |
import * as React from 'react'; | |
import { Component, ComponentClass, createRef, forwardRef, Ref } from 'react'; | |
const myHoc = <ComposedComponentProps extends {}>( | |
ComposedComponent: ComponentClass<ComposedComponentProps>, | |
) => { | |
type ComposedComponentInstance = InstanceType<typeof ComposedComponent>; | |
type WrapperComponentProps = ComposedComponentProps & { | |
wrapperComponentProp: number; |
const WithJustAutoRun = React.memo((props: { | |
first: Todo; | |
second: Todo; | |
counter: number; | |
}) => { | |
const rendered = useObservation(() => { | |
return ( | |
<div> | |
<h1> |
import React, { Component } from "react"; | |
import ReactDOM from "react-dom"; | |
import { store, observer } from "./konteks"; | |
import "./index.css"; | |
const state = store({ | |
text: "", | |
number: 0, | |
increment: () => state.number++, |
#[derive(Debug)] | |
pub struct DenseVecStorage<T> | |
where | |
T: Component, | |
{ | |
components: Vec<T>, | |
entity_ids: Vec<usize>, | |
component_ids: Vec<usize>, | |
} |