Skip to content

Instantly share code, notes, and snippets.

View spidgorny's full-sized avatar
💭
Building Flutter apps

Slawa Pidgorny spidgorny

💭
Building Flutter apps
View GitHub Profile
@spidgorny
spidgorny / privacy-policy.md
Created January 9, 2026 18:22
Privacy Policy for POI Nearby

Privacy Policy for POI Nearby

Last Updated: January 4, 2026

Introduction

POI Nearby ("we", "our", or "the app") is committed to protecting your privacy. This Privacy Policy explains how we collect, use, and safeguard your information when you use our mobile application.

Information We Collect

@spidgorny
spidgorny / weekly-git-report.sh
Created March 12, 2025 11:42
weekly-git-report.sh
# Usage bash weekly-git-report.sh [days=7]
DAYS=${1:-7}
FOLDERS=$(find . -maxdepth 2 -name ".git" -type d | sort)
# echo $FOLDERS
ROOT=$(pwd)
echo "$FOLDERS" | while read -r folder; do
folder=$(dirname "$folder")
echo "==$folder=="
echo "$ROOT/$folder"
@spidgorny
spidgorny / gist:5a0d7f524ce888670947ac97a5c6e572
Created January 22, 2024 21:45
download file from s3 with await
async function waitForDownloadStreamToFinish(
readable: StreamingBlobPayloadOutputTypes,
writeStream: fs.WriteStream,
) {
return new Promise(async (resolve, reject) => {
(readable as http.IncomingMessage)
.pipe(writeStream)
.on("error", (err: Error) => reject(err))
.on("close", () => resolve(null));
});
@spidgorny
spidgorny / colors.js
Created November 11, 2022 14:11
tailwind color without tailwind
export const colors = {
slate: {
50: "#f8fafc",
100: "#f1f5f9",
200: "#e2e8f0",
300: "#cbd5e1",
400: "#94a3b8",
500: "#64748b",
600: "#475569",
700: "#334155",
@spidgorny
spidgorny / lidl-button.py
Created October 15, 2022 11:13
Silver Crest ( Lidl) smart Button Home Assistant Quirks
"""Lidl TS004F Smart Button SSBM A1"""
from zigpy.profiles import zha
from zigpy.quirks import CustomDevice
from zigpy.zcl.clusters.general import (
Basic,
Groups,
Identify,
LevelControl,
OnOff,
@spidgorny
spidgorny / TailLog.php
Created July 9, 2021 19:27
Display only the last error from the Laravel log file and simplify output so that it fits the single screen output. Like "tail -f storage/logs/laravel.log", but smart
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Storage;
class TailLog extends Command
{
/**
// you can run this tutorial - it's executable
// fake function for demonstration
async function fetchSomething(item) {
return item;
}
async function learnLoops() {
// let's have some simple array first
// note that each value has also an 0-base index
# List samba shares
smbclient -L 192.168.1.189 -U depidsvy
# mount NFS
sudo mount 192.168.1.189:/volume1/photo /media/nas/photo
# mount samba share to a folder
sudo mount -t cifs -o username=depidsvy,password=$pw,uid=slawa,gid=users //192.168.1.189/photo /media/nas/photo2
# mount SFTP
import 'dart:convert';
import "dart:io";
import 'package:html/dom.dart';
import 'package:html/parser.dart' as parser;
import "package:http/http.dart" as http;
import 'package:http/http.dart';
import "package:yaml/yaml.dart";
main() async {
let g:netrw_banner = 0
let g:netrw_liststyle = 3
let g:netrw_browse_split = 4
let g:netrw_altv = 1
let g:netrw_winsize = 25