Skip to content

Instantly share code, notes, and snippets.

import time
import board
import neopixel
pixel_pin = board.D2
num_pixels = 16
pixels = neopixel.NeoPixel(pixel_pin, num_pixels, brightness=0.7, auto_write=False)
while True:
@Dornal2002
Dornal2002 / uppyIntegration
Created February 11, 2025 17:59
Antd and Uppy integration using React js
import { useEffect, useRef, useState } from "react";
import { Upload, Button } from "antd";
import { UploadOutlined } from "@ant-design/icons";
import Uppy from "@uppy/core";
import AwsS3 from "@uppy/aws-s3";
const UppyAntdUploader = () => {
@vitoksmile
vitoksmile / HintAnchorState.kt
Last active February 11, 2025 18:02
ComposeHints
@Stable
class HintAnchorState internal constructor() {
internal var size: IntSize by mutableStateOf(IntSize.Zero)
internal var offset: Offset by mutableStateOf(Offset.Zero)
}
@Composable
fun rememberHintAnchorState(): HintAnchorState {
@Schoolads
Schoolads / gist:086d3bf004457ac0e28f31ef4dc62203
Created February 11, 2025 17:59
School of Nursing, Vom, Jos 2025/2026 {O8125777035} Admission Form Is STILL ON SALE.. Call DR.MRS ALICE OGUNSOLA on {O8125777035}.The Management of the school hereby inform the general public of the sales of the general Nursing Admission form into the School of Nursing, Also midwifery, post-basic midwifery form, post-basic nursing form and inter…
School of Nursing, Vom, Jos 2025/2026 {O8125777035} Admission Form Is STILL ON SALE.. Call DR.MRS ALICE OGUNSOLA on {O8125777035}.The Management of the school hereby inform the general public of the sales of the general Nursing Admission form into the School of Nursing, Also midwifery, post-basic midwifery form, post-basic nursing form and internship form are still on sale for more information on purchase of the form and admission assistance call Admin Officer{O8125777035}
@vitoksmile
vitoksmile / ComposeHints4.kt
Created February 11, 2025 17:59
ComposeHints
Column(
Modifier.onGloballyPositioned { coordinates ->
// This will be the size of the Column.
coordinates.size
// The position of the Column relative to the application window.
coordinates.positionInWindow()
// The position of the Column relative to the Compose root.
coordinates.positionInRoot()
// These will be the alignment lines provided to the layout (empty here for Column).
coordinates.providedAlignmentLines
@choco-bot
choco-bot / FilesSnapshot.xml
Created February 11, 2025 17:59
python3-x86_32 v3.5.2.20170425 - Failed - Package Tests Results
<?xml version="1.0" encoding="utf-8"?>
<fileSnapshot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<files>
<file path="C:\ProgramData\chocolatey\lib\python3-x86_32\python3-x86_32.nupkg" checksum="807C596120024B0297F0AAA68C5CD1C4" />
<file path="C:\ProgramData\chocolatey\lib\python3-x86_32\python3-x86_32.nuspec" checksum="7BEBFD7FB9200B719A81569484AAE6EE" />
<file path="C:\ProgramData\chocolatey\lib\python3-x86_32\tools\chocolateyInstall.ps1" checksum="760D3B96526F46FAEFEF9B18E6D41A88" />
</files>
</fileSnapshot>
@vitoksmile
vitoksmile / HintOverlayBrush.kt
Last active February 11, 2025 18:02
ComposeHints
CompositionLocalProvider(
LocalHintOverlayBrush provides Brush.linearGradient(
listOf(
Color.Red.copy(alpha = 0.5f),
Color.Blue.copy(alpha = 0.5f),
)
),
) {
HintOverlay()
}
@vitoksmile
vitoksmile / HintOverlay.kt
Last active February 11, 2025 18:01
ComposeHints
val LocalHintOverlayColor = staticCompositionLocalOf<Color> { Color(0x44000000) }
val LocalHintOverlayBrush = staticCompositionLocalOf<Brush?> { null }
@Composable
fun HintOverlay() {
Popup {
Box(
modifier = Modifier
.fillMaxSize()
@mischmaesch
mischmaesch / .gitignore
Created February 11, 2025 17:58 — forked from AkdM/.gitignore
Daily backup Home Assistant configuration into a git repository
# You can whitelist files/folders with !, those will not be ignored.
# Everything that starts with a / are for root elements
# ignore
/custom_components/
/zigbee2mqtt/log
/zigbee2mqtt/state.json
/home-assistant_v2.* # Exclude Home Assistant history-related database. Make sure to enable git LFS if you don't exclude that, since those files can go easily over 100MB
/home-assistant.log*
/.ssh/
# Write your code here :-)
Now, lets add the lights
Click the button to cycle through the list and change the color
import time
import board
import neopixel
from digitalio import DigitalInOut, Direction, Pull
switch = DigitalInOut(board.D3)