Skip to content

Instantly share code, notes, and snippets.

use std::time::Instant;
let start = Instant::now();
// ...
let duration = start.elapsed();
println!("Time elapsed in expensive_function() is: {:?}", duration);
import {HiAcademicCap, HiCog, HiUserCircle, HiAdjustments} from 'react-icons/hi'
const NavItem = ({Icon, text}: { Icon: any; text: string }) => {
return (
<a href={"#"} className={"w-full text-center block py-2 hover:bg-blue-400 hover:text-white transition duration-200"}>
{Icon
? <Icon className={"w-6 h-6 mb-1 mx-auto"}/>
: <div className={"w-6 h-6 mb-1 mx-auto"}/>}
{text}
</a>
function insertAfter(newNode, existingNode) {
existingNode.parentNode.insertBefore(newNode, existingNode.nextSibling);
}
@simbesh
simbesh / Shield_Intents.MD
Last active March 9, 2021 17:38 — forked from mcfrojd/Shield_Intents.MD
Working INTENTS to use with Community Hass.io Add-ons: Android Debug Bridge for your Nvidia Shield TV

Credits and thanks: Home Assistant Forum users: @ocso, @wiphye, @teachingbirds, @tboyce1, @simbesh


Starts Netflix (Shows profiles if its the first start.)

{"entity_id" :"media_player.shield", "intent": "-n com.netflix.ninja/.MainActivity"}

Starts Twitch (Starts to play the stream)

{"entity_id" :"media_player.shield", "intent": "twitch://stream/frenck"}