A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$ if your browser aliases it:
~ 108 byte version
| #!/bin/bash | |
| while true; do | |
| real=$(sensors | grep 'temp1' | grep -oP -m 1 "\+\d{2}.\d°C" | head -1 | gre$ | |
| high=85 | |
| if [ "$real" -ge "$high" ];then | |
| notify-send "The temperature of GPU is very high! (+$real°C)" | |
| sleep 60 | |
| else | |
| sleep 5 |
| import React, { PureComponent } from "react"; | |
| import PropTypes from "prop-types"; | |
| /** | |
| * @class | |
| * @description Simple Flexbox wrapper. | |
| * @author Mike Eling <mike.eling97@gmail.com> | |
| */ | |
| class FlexWrapper extends PureComponent { | |
| /** |
| import React, { PureComponent } from "react"; | |
| import { View } from "react-native"; | |
| import PropTypes from "prop-types"; | |
| /** | |
| * @class | |
| * @description Simple Flexbox wrapper. | |
| * @author Mike Eling <mike.eling97@gmail.com> | |
| */ | |
| class FlexWrapper extends PureComponent { |
| function getHighlightedText(text, highlights) { | |
| let parts = text.split(new RegExp(`(${highlights.join("|")})`, "gi")); | |
| return ( | |
| <span> | |
| {parts.map((part, i) => ( | |
| <span | |
| key={i} | |
| style={highlights.indexOf(part) > -1 ? { fontWeight: "bold" } : {}}> | |
| {part} | |
| </span> |
| <div> | |
| <h1>This are the terms of my service</h1> | |
| <h3>Consider having no problems at all with it</h3> | |
| <ol> | |
| <li><a href="#foo">Foo</a></li> | |
| <li><a href="#bar">Bar</a></li> | |
| <li><a href="#baz">Baz</a></li> | |
| <li><a href="#qux">Qux</a></li> | |
| </ol> |
| (() => { | |
| // Interval, wykonuje się co 400 ms. | |
| setInterval(() => { | |
| // Sprawdza czy cookie "interface" ma ustawioną wartość "si". | |
| const isSi = getCookie("interface") == "si" ? true : false; | |
| // Sprawdza czy użytkownik jest away from the keyboard. | |
| const afk = isSi ? hero.stasis : Engine.hero.d.stasis; | |
| // Sprawdza czy użytkownik dedł. | |
| const dead = isSi ? g.dead : Engine.dead; | |
| // Sprawdza czy użytkownik się napitala. |
| /** | |
| * Freeze your object with this Freezer. | |
| * @author Me or You | |
| * @param roomTemperatureData Data for super cooling. | |
| * @example Freezer({ value: "foo" }, { name: "bar" }); | |
| * @returns Frozen as hell data. | |
| */ | |
| const Freezer = (...roomTemperatureData: Object[]) => Object.freeze( roomTemperatureData.map(item => Object.freeze(item) ) ); |
| /** | |
| * Returns a function that delays callback. | |
| */ | |
| const useDelay = () => { | |
| const ref = useRef<(fn: Function, ms: number) => void | null>(null); | |
| if(ref.current === null) { | |
| let t = -1; | |
| const delay = (fn: Function, ms: number) => { | |
| clearTimeout(t); |
| import { useRef, useState } from 'react'; | |
| import NetInfo from "@react-native-community/netinfo"; | |
| /** | |
| * Returns information about internet connectivity. | |
| * @example const [isConnected, checkConnection] = useConnectivity(); | |
| */ | |
| export const useConnectivity = () => { | |
| const [ isConnected, setConnected ] = useState<boolean | null>(null); | |
| const ref = useRef<[ typeof isConnected, () => void ] | null>(null); |