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
curl -o ~/Downloads/hpdrivers.dmg https://updates.cdn-apple.com/2020/macos/001-41745-20201210-DBC9B46B-88B2-4032-87D9-449AF1D20804/HewlettPackardPrinterDrivers.dmg | |
hdiutil attach ~/Downloads/hpdrivers.dmg | |
pkgutil --expand /Volumes/HP_PrinterSupportManual/HewlettPackardPrinterDrivers.pkg ~/Downloads/hp-expand | |
hdiutil eject /Volumes/HP_PrinterSupportManual | |
sed -i '' 's/12.0/16.0/' ~/Downloads/hp-expand/Distribution |
const convertAverageRatingIntoStarsStatusObject = ( | |
averageRating: number | |
) => { | |
const parseDecimalToStar = { | |
1: 0, | |
2: 0, | |
3: 0.5, | |
4: 0.5, | |
5: 0.5, | |
6: 0.5, |
import { ArrowUpFromLine, Pencil, Trash2 } from "lucide-react"; | |
import { ChangeEvent, useEffect, useRef, useState } from "react"; | |
import { useClickOutside } from "@/hooks/use-click-outside"; | |
import { Touchable } from "./touchable"; | |
export const ImagePicker = ({ | |
id = 1, // 2, 3, ... | |
image, |
import { useEffect, useRef } from 'react'; | |
export const useOnlyCallOnce = (cb, condition = true) => { | |
const isCalledRef = useRef(false); | |
useEffect(() => { | |
if (condition && !isCalledRef.current) { | |
isCalledRef.current = true; | |
cb(); | |
} |
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
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 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") |
{
"folders": [
"use client" | |
import { WithSidebar } from "@/components/with-sidebar" | |
export const Dashboard = () => { | |
return ( | |
<WithSidebar | |
sidebarContent={SidebarContent} | |
mobileDashboardHeader={CustomHeader}> | |
<div className="p-10"> |