using embassy
git clone https://github.com/embassy-rs/embassy.git
&cd embassy/examples/rp
- edit the
.cargo/config.toml
file and replace runner line with this:runner = "elf2uf2-rs -d"
cargo run --bin wifi_blinky --release
using embassy
git clone https://github.com/embassy-rs/embassy.git
& cd embassy/examples/rp
.cargo/config.toml
file and replace runner line with this: runner = "elf2uf2-rs -d"
cargo run --bin wifi_blinky --release
{ | |
// TODO: remember: save changes of this on https://gist.github.com/sturmenta/eb93a8e1367d445b2bb81f5263db05f7 | |
// | |
// ─── rust ───────────────────────────────────────────────────────────────────────────── | |
// | |
"println": { | |
"prefix": "prt", | |
"body": [ | |
"println!(\"$1 = {:#?}\", $1);" | |
], |
"use client" | |
import { WithSidebar } from "@/components/with-sidebar" | |
export const Dashboard = () => { | |
return ( | |
<WithSidebar | |
sidebarContent={SidebarContent} | |
mobileDashboardHeader={CustomHeader}> | |
<div className="p-10"> |
import { useEffect, useState } from "react" | |
export const useWindowSize = () => { | |
const [size, setSize] = useState({ vh: 0, vw: 0 }) | |
const onResize = (props: any) => | |
setSize({ | |
vh: props.target.innerHeight, | |
vw: props.target.innerWidth | |
}) |
/* Hide scrollbar with class .hide-scroll */ | |
/* for Chrome, Safari and Opera */ | |
.hide-scroll::-webkit-scrollbar { | |
display: none; | |
/* Hide scrollbar for IE, Edge and Firefox */ | |
-ms-overflow-style: none; /* IE and Edge */ | |
scrollbar-width: none; /* Firefox */ | |
} | |
/* Always show scrollbar with class .always-show-scroll */ |
import { useEffect, useRef, useState } from "react"; | |
export const useGetDivDimensions = () => { | |
const [dimensions, setDimensions] = useState({ height: 0, width: 0 }); | |
const div_ref = useRef<HTMLDivElement | null>(null); | |
useEffect(() => { | |
const resizeObserver = new ResizeObserver((event) => { | |
setDimensions({ |
import { useState, useEffect } from 'react'; | |
const useContainerDimensions = containerRef => { | |
const getDimensions = () => ({ | |
width: containerRef.offsetWidth, | |
height: containerRef.offsetHeight | |
}); | |
const [dimensions, setDimensions] = useState({ width: 0, height: 0 }); |
import dayjs from "dayjs" | |
import { useEffect, useState } from "react" | |
import { Text } from "react-native" | |
// NOTE: | |
// show max 59:59 time remaining | |
// show 00:00 when time is expired | |
export const RemainingTime = ({ expired_time }: { expired_time: string }) => { | |
const [time, setTime] = useState("00:00") |
guide of how to use react-native-vector-icons on web with webpack and react-app-rewired
react-scripts start/build/test
) "start": "react-app-rewired start",
"build": "react-app-rewired build",
"test": "react-app-rewired test --env=jsdom",
{
"folders": [